qed: Add RoCE ll2 & GSI support
Hello Ram Amrani,
This is a semi-automatic email about new static checker warnings.
The patch abd49676c707: "qed: Add RoCE ll2 & GSI support" from Oct 1, 2016, leads to the following Smatch complaint:
drivers/net/ethernet/qlogic/qed/qed_roce.c:2812 qed_roce_ll2_stop()
warn: variable dereferenced before check 'cdev' (see line 2808)
drivers/net/ethernet/qlogic/qed/qed_roce.c
2807 {
2808 struct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev);
2809 struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2;
^^^^^^^^^Deref.
2810 int rc;
2811
2812 if (!cdev) {
^^^^^Checked too late.
2813 DP_ERR(cdev, "qed roce ll2 stop: invalid cdev\n"); 2814 return -EINVAL;
regards,
dan carpenter
+Yuval
Thank you Dan. We'll take care of this as well.
Quoted 34 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Tuesday, October 11, 2016 10:33 AM
To: Amrani, Ram <[email protected]>
Cc: [email protected]
Subject: re: qed: Add RoCE ll2 & GSI supportHello Ram Amrani,
This is a semi-automatic email about new static checker warnings.
The patch
abd49676c707: "qed: Add RoCE ll2 & GSI support" from Oct 1, 2016, leads to the following Smatch complaint:
drivers/net/ethernet/qlogic/qed/qed_roce.c:2812qed_roce_ll2_stop()
warn: variable dereferenced before check 'cdev' (see line 2808)
drivers/net/ethernet/qlogic/qed/qed_roce.c
2807 {
2808 structqed_hwfn*hwfn =QED_LEADING_HWFN(cdev);2809 struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2; ^^^^^^^^^ Deref.2810 int rc;
28112812 if (!cdev) { ^^^^^Checked too late.
2813 DP_ERR(cdev, "qed roce ll2 stop: invalid cdev\n"); 2814 return -EINVAL;regards,
dan carpenter