This patch fixes the mishandling of the return values of class_create
and class_device_create in drivers/char/drm/drm_sys.c. These two
functions do not return NULL on error.
--- linux-2.6/drivers/char/drm/drm_sysfs.c.orig
+++ linux-2.6/drivers/char/drm/drm_sysfs.c
@@ -45,7 +45,7 @@ struct class *drm_sysfs_create(struct mo
struct class *class;
class = class_create(owner, name);
- if (!class)
+ if (IS_ERR(class))
return class;
class_create_file(class, &class_attr_version);
@@ -103,8 +103,8 @@ struct class_device *drm_sysfs_device_ad
MKDEV(DRM_MAJOR, head->minor),
&(head->dev->pdev)->dev,
"card%d", head->minor);
- if (!class_dev)
- return NULL;
+ if (IS_ERR(class_dev))
+ return class_dev;
class_set_devdata(class_dev, head);
--
Chris Lesiak
[EMAIL PROTECTED]
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel