Re: [PATCH] Device class reference counting

From: Thomas Koeller
Date: Fri Aug 06 2004 - 04:44:52 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/