projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
563558b
)
memstick: core: fix device_register() error handling
author
Vasiliy Kulikov
<segooon@gmail.com>
Thu, 13 Jan 2011 01:01:00 +0000
(17:01 -0800)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:21 +0000
(08:03 -0800)
If device_register() fails then call put_device(). See comment to
device_register.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/memstick/core/memstick.c
patch
|
blob
|
history
diff --git
a/drivers/memstick/core/memstick.c
b/drivers/memstick/core/memstick.c
index c00fe8253c517970bca643dcd68bb63e7f4d2e98..4303b7ef73e2854a6ec9926f27214d9106c6909f 100644
(file)
--- a/
drivers/memstick/core/memstick.c
+++ b/
drivers/memstick/core/memstick.c
@@
-465,6
+465,7
@@
static void memstick_check(struct work_struct *work)
if (!host->card) {
host->card = card;
if (device_register(&card->dev)) {
+ put_device(&card->dev);
kfree(host->card);
host->card = NULL;
}