Messages in this thread Patch in this message | | | Subject | Re: [PATCH] Driver Core patches for 2.6.9 | Date | Tue, 19 Oct 2004 09:37:04 -0700 | From | Greg KH <> |
| |
ChangeSet 1.1992, 2004/09/29 16:28:06-07:00, hare@suse.de
[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@suse.de> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |