Re: [PATCH] Driver Core patches for 2.6.9
From: Greg KH
Date: Fri Oct 22 2004 - 02:47:47 EST
ChangeSet 1.1992, 2004/09/29 16:28:06-07:00, hare@xxxxxxx
[PATCH] Driver Core: Handle NULL arg for put_device()
Since get_device() accepts a NULL argument, put_device() should do so, too.
Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>
drivers/base/core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
diff -Nru a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c 2004-10-19 09:20:41 -07:00
+++ b/drivers/base/core.c 2004-10-19 09:20:41 -07:00
@@ -293,7 +293,8 @@
*/
void put_device(struct device * dev)
{
- kobject_put(&dev->kobj);
+ if (dev)
+ kobject_put(&dev->kobj);
}
-
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/