projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
801c73c
)
[media] media: rc: lirc_dev: check kobject_set_name() result
author
Vasiliy Kulikov
<segoon@openwall.com>
Fri, 26 Nov 2010 17:06:41 +0000
(14:06 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Wed, 29 Dec 2010 10:16:58 +0000
(08:16 -0200)
kobject_set_name() may fail with -ENOMEM, check for it.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/lirc_dev.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/rc/lirc_dev.c
b/drivers/media/rc/lirc_dev.c
index 6b9fc74f2e1d018aabd30a7733ea351a26fcc3c2..fd237ab120bbbd8a3a753b379f3edddb41079f61 100644
(file)
--- a/
drivers/media/rc/lirc_dev.c
+++ b/
drivers/media/rc/lirc_dev.c
@@
-178,7
+178,9
@@
static int lirc_cdev_add(struct irctl *ir)
cdev_init(cdev, &lirc_dev_fops);
cdev->owner = THIS_MODULE;
}
- kobject_set_name(&cdev->kobj, "lirc%d", d->minor);
+ retval = kobject_set_name(&cdev->kobj, "lirc%d", d->minor);
+ if (retval)
+ return retval;
retval = cdev_add(cdev, MKDEV(MAJOR(lirc_base_dev), d->minor), 1);
if (retval)