ChangeSet 1.1608.84.6, 2004/03/10 16:06:14-08:00, chrisw@osdl.org [PATCH] 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 | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c --- a/drivers/scsi/sg.c Mon Mar 15 15:29:36 2004 +++ b/drivers/scsi/sg.c Mon Mar 15 15:29:36 2004 @@ -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);