Re: [bug report] RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 31, 2018 at 03:37:13PM +0300, Dan Carpenter wrote:
> Hello Devesh Sharma,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 6e04b1035689: "RDMA/bnxt_re: Fix broken RoCE driver due to 
> recent L2 driver changes" from May 25, 2018, leads to the following 
> Smatch complaint:
> 
>     drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:612 bnxt_qplib_disable_rcfw_channel()
>      warn: variable dereferenced before check 'rcfw->creq_bar_reg_iomem' (see line 606)
> 
> drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
>    605	
>    606		bnxt_qplib_rcfw_stop_irq(rcfw, true);
>                                          ^^^^
> dereferenced inside function
> 
>    607	
>    608		if (rcfw->cmdq_bar_reg_iomem)
>                     ^^^^^^^^^^^^^^^^^^^^^^^^
> too late.
> 
>    609			iounmap(rcfw->cmdq_bar_reg_iomem);
>    610		rcfw->cmdq_bar_reg_iomem = NULL;
>    611	
>    612		if (rcfw->creq_bar_reg_iomem)
>    613			iounmap(rcfw->creq_bar_reg_iomem);
>    614		rcfw->creq_bar_reg_iomem = NULL;
>

This should be fixed to be more clear, but from what I can see, the
test for 'if (rcfw->cmdq_bar_reg_iomem)' can not fail?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux