Browse Source

scsi_dh_hp_sw: fix return value on failed allocation

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Christoph Hellwig 11 years ago
parent
commit
0b9c08442c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/scsi/device_handler/scsi_dh_hp_sw.c

+ 1 - 1
drivers/scsi/device_handler/scsi_dh_hp_sw.c

@@ -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;