Skip to contentSkip to conversation

class_simple cleanup in sg

PATCH Applied Chris Wright 2 participants 2 messages Mar 4, 2004 – Mar 11, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 class_simple cleanup in sg

The only spot that seems to care about class_simple_device_add possibly failing, but it gets the wrong error test.

===== drivers/scsi/sg.c 1.81 vs edited =====

drivers/scsi/sg.c +1 -1
@@ -1439,7 +1439,7 @@
 				MKDEV(SCSI_GENERIC_MAJOR, k), 
 				cl_dev->dev, "%s", 
 				disk->disk_name);
-		if (NULL == sg_class_member)
+		if (IS_ERR(sg_class_member))
 			printk(KERN_WARNING "sg_add: "
 				"class_simple_device_add failed\n");
 		class_set_devdata(sg_class_member, sdp);
Applied
#1 lore raw
Quoted 2 lines · Chris Wright

The only spot that seems to care about class_simple_device_add possibly failing, but it gets the wrong error test.

Applied, thanks.

greg k-h