lkml.org 
[lkml]   [2004]   [Aug]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromThomas Koeller <>
SubjectRe: [PATCH] Device class reference counting
DateFri, 6 Aug 2004 11:43:47 +0200
Sorry,

seems the patch got messsed up somehow, so I am
resending it:

--- linux-mips/drivers/base/class.c     2004-07-14 16:21:33.000000000 +0200
+++ linux-mips-work/drivers/base/class.c        2004-08-06 11:06:10.983688216 +0200
@@ -349,14 +349,19 @@

 int class_device_add(struct class_device *class_dev)
 {
-       struct class * parent;
+       struct class * parent = NULL;
        struct class_interface * class_intf;
        int error;

        class_dev = class_device_get(class_dev);
-       if (!class_dev || !strlen(class_dev->class_id))
+       if (!class_dev)
                return -EINVAL;

+       if (!strlen(class_dev->class_id)) {
+               error = -EINVAL;
+               goto register_done;
+       }
+
        parent = class_get(class_dev->class);

        pr_debug("CLASS: registering class device: ID = '%s'\n",
-- 
--------------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:05    [from the cache]
©2003-2008