2004-03-04 04:10:12

by Chris Wright

[permalink] [raw]
Subject: [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 1.81 vs edited =====
--- 1.81/drivers/scsi/sg.c Fri Feb 6 00:21:23 2004
+++ edited/drivers/scsi/sg.c Wed Mar 3 19:56:13 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);


2004-03-11 01:45:32

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] class_simple cleanup in sg

On Wed, Mar 03, 2004 at 08:06:25PM -0800, Chris Wright wrote:
> 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