In the Linux kernel it is preferred to return a meaningful error code
instead of -1. This patch does not change the behavior of the caller of
qla82xx_pinit_from_rom().

Signed-off-by: Bart Van Assche <[email protected]>
Acked-by: Quinn Tran <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Cc: Himanshu Madhani <[email protected]>
Cc: Christoph Hellwig <[email protected]>
---
 drivers/scsi/qla2xxx/qla_nx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index b6b4cfd..54380b4 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1229,7 +1229,7 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
        if (buf == NULL) {
                ql_log(ql_log_fatal, vha, 0x010c,
                    "Unable to allocate memory.\n");
-               return -1;
+               return -ENOMEM;
        }
 
        for (i = 0; i < n; i++) {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to