From: Christoph Hellwig Date: Sun, 14 Sep 2014 18:01:34 +0000 (-0700) Subject: scsi_dh_hp_sw: fix return value on failed allocation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b9c08442c5d0991dd1632fed63221f5b6a35e83;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi_dh_hp_sw: fix return value on failed allocation Signed-off-by: Christoph Hellwig Reviewed-by: Mike Christie Reviewed-by: Hannes Reinecke --- diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 4ee2759f5299..4824bfbe3051 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/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;