Commit 20e358f2 authored by Chris Wright's avatar Chris Wright Committed by Greg Kroah-Hartman

[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.
parent ee328e2c
...@@ -1439,7 +1439,7 @@ sg_add(struct class_device *cl_dev) ...@@ -1439,7 +1439,7 @@ sg_add(struct class_device *cl_dev)
MKDEV(SCSI_GENERIC_MAJOR, k), MKDEV(SCSI_GENERIC_MAJOR, k),
cl_dev->dev, "%s", cl_dev->dev, "%s",
disk->disk_name); disk->disk_name);
if (NULL == sg_class_member) if (IS_ERR(sg_class_member))
printk(KERN_WARNING "sg_add: " printk(KERN_WARNING "sg_add: "
"class_simple_device_add failed\n"); "class_simple_device_add failed\n");
class_set_devdata(sg_class_member, sdp); class_set_devdata(sg_class_member, sdp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment