scsi_dh_hp_sw: fix return value on failed allocation
authorChristoph Hellwig <hch@lst.de>
Sun, 14 Sep 2014 18:01:34 +0000 (11:01 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:19:17 +0000 (11:19 +0100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/device_handler/scsi_dh_hp_sw.c

index 4ee2759f5299a531b62ff15e24eb89079bffb7e7..4824bfbe3051b6e48c4dd59315d867bffa63075a 100644 (file)
@@ -364,7 +364,7 @@ static int hp_sw_bus_attach(struct scsi_device *sdev)
        if (!scsi_dh_data) {
                sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n",
                            HP_SW_NAME);
-               return 0;
+               return -ENOMEM;
        }
 
        scsi_dh_data->scsi_dh = &hp_sw_dh;