Re: [patch] 2.6.10-rc1-mm4: bttv-driver.c compile error

From: Andrew Morton
Date: Wed Nov 10 2004 - 03:49:52 EST


Gerd Knorr <kraxel@xxxxxxxxxxx> wrote:
>
> > kobject_register failed for <NULL> (-17)
>
> IIRC there was a bug in the driver base and a patch from Gred fixing
> that floating around, maybe that one helps?

err, yes. Without that patch the kobject layer will scribble on memory and
all bets are off.

Try this:

--- a/lib/kobject.c 2004-11-09 12:09:33 -08:00
+++ b/lib/kobject.c 2004-11-09 12:09:33 -08:00
@@ -180,10 +180,10 @@

error = create_dir(kobj);
if (error) {
+ /* unlink does the kobject_put() for us */
unlink(kobj);
if (parent)
kobject_put(parent);
- kobject_put(kobj);
} else {
kobject_hotplug(kobj, KOBJ_ADD);
}

-
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/