scsi: qedf: Honor qed_ops->common->set_fp_int() return code.
authorChad Dupuis <chad.dupuis@cavium.com>
Wed, 31 May 2017 13:33:50 +0000 (06:33 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:48:05 +0000 (20:48 -0400)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_main.c

index a3b040a18535626ae8f88d11d7f8e1c79187e034..549598f75c6343e14e85096a745498a0b9385947 100644 (file)
@@ -2035,6 +2035,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)