summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedf/qedf_main.c
diff options
context:
space:
mode:
authorSaurav Kashyap <skashyap@marvell.com>2019-04-21 22:44:58 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-04-29 08:34:09 -0400
commit19c2b6d84b7206548caedda83de96f54ff76f655 (patch)
tree1d1a6e1dd006a7c6e9e44d5fdc930dae912ec068 /drivers/scsi/qedf/qedf_main.c
parent249b148f3620577c923894dfab5a75cb59c024eb (diff)
downloadlinux-19c2b6d84b7206548caedda83de96f54ff76f655.tar.gz
linux-19c2b6d84b7206548caedda83de96f54ff76f655.tar.bz2
linux-19c2b6d84b7206548caedda83de96f54ff76f655.zip
scsi: qedf: Check the return value of start_xmit
Log the reason for start xmit failure. Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_main.c')
-rw-r--r--drivers/scsi/qedf/qedf_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index e2f3228f15a6..1de2b18dd96a 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -1141,7 +1141,12 @@ static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp)
if (qedf_dump_frames)
print_hex_dump(KERN_WARNING, "fcoe: ", DUMP_PREFIX_OFFSET, 16,
1, skb->data, skb->len, false);
- qed_ops->ll2->start_xmit(qedf->cdev, skb, 0);
+ rc = qed_ops->ll2->start_xmit(qedf->cdev, skb, 0);
+ if (rc) {
+ QEDF_ERR(&qedf->dbg_ctx, "start_xmit failed rc = %d.\n", rc);
+ kfree_skb(skb);
+ return rc;
+ }
return 0;
}