scsi: cxgb4i: Fix dereference of pointer tdata before it is null checked
Currently pointer tdata is being dereferenced on the initialization of pointer skb before tdata is null checked. This could lead to a potential null pointer dereference. Fix this by dereferencing tdata after tdata has been null pointer sanity checked. Link: https://lore.kernel.org/r/20200709135217.1408105-1-colin.king@canonical.com Fixes: e33c2482 ("scsi: cxgb4i: Add support for iSCSI segmentation offload") Addresses-Coverity: ("Dereference before null check") Acked-by: NVarun Prakash <varun@chelsio.com> Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Showing
想要评论请 注册 或 登录