diff mbox

[03/15] qedf: Honor qed_ops->common->set_fp_int() return code.

Message ID 20170523131931.1777-4-chad.dupuis@cavium.com (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Dupuis, Chad May 23, 2017, 1:19 p.m. UTC
We need to check the return code the set_fp_int() callback in case we were
not allocated any fastpath interrupts or there was an error setting up the
fastpath interrupts from the qed perspective.

Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
---
 drivers/scsi/qedf/qedf_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bart Van Assche May 24, 2017, 4:22 p.m. UTC | #1
On Tue, 2017-05-23 at 06:19 -0700, Dupuis, Chad wrote:
> We need to check the return code the set_fp_int() callback in case we were
> not allocated any fastpath interrupts or there was an error setting up the
> fastpath interrupts from the qed perspective.

Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
diff mbox

Patch

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index c8d1688..f703801 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2036,6 +2036,8 @@  static int qedf_setup_int(struct qedf_ctx *qedf)
 	 * Learn interrupt configuration
 	 */
 	rc = qed_ops->common->set_fp_int(qedf->cdev, num_online_cpus());
+	if (rc <= 0)
+		return 0;
 
 	rc  = qed_ops->common->get_fp_int(qedf->cdev, &qedf->int_info);
 	if (rc)