Skip to contentSkip to conversation

ps3rom: fix error return code

PATCH In review Michael Ellerman 2 participants 2 messages Nov 5, 2014

Subsystems (3)
lore
Share & tools
lore

Michael Ellerman

author reviewer
#0 lore raw

PATCH 1/1 ps3rom: fix error return code

From: Julia Lawall <[email protected]>

Set the return variable to an error code as done elsewhere in the function.

---
 drivers/scsi/ps3rom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ps3rom.c +1 -0
index ef23fabe3924..619caf1acc9c 100644
@@ -387,6 +387,7 @@ static int ps3rom_probe(struct ps3_system_bus_device *_dev)
 	if (!host) {
 		dev_err(&dev->sbd.core, "%s:%u: scsi_host_alloc failed\n",
 			__func__, __LINE__);
+		error = -ENOMEM;
 		goto fail_teardown;
 	}
 
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Michael Ellerman

From: Julia Lawall <[email protected]>

Set the return variable to an error code as done elsewhere in the function.

---
 drivers/scsi/ps3rom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ps3rom.c +0 -0
index ef23fabe3924..619caf1acc9c 100644

drivers/scsi/ps3rom.c static int ps3rom_probe(struct ps3_system_bus_device *_dev) · line 393

Quoted 7 lines
drivers/scsi/ps3rom.c +1 -0
@@ -387,6 +387,7 @@ static int ps3rom_probe(struct ps3_system_bus_device *_dev)
 	if (!host) {
 		dev_err(&dev->sbd.core, "%s:%u: scsi_host_alloc failed\n",
 			__func__, __LINE__);
+		error = -ENOMEM;
 		goto fail_teardown;
 	}
 

Looks OK. James, please apply.