diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2010-11-26 14:06:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 08:16:58 -0200 |
commit | b395cbac36e58a55729fe7e6262a3f0b1691bced (patch) | |
tree | f84e410d258df3f890e891377bd681beb3381b33 | |
parent | 801c73c04ad57689dc9b47baf62cbb23f954d987 (diff) | |
download | blackbird-op-linux-b395cbac36e58a55729fe7e6262a3f0b1691bced.tar.gz blackbird-op-linux-b395cbac36e58a55729fe7e6262a3f0b1691bced.zip |
[media] media: rc: lirc_dev: check kobject_set_name() result
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>
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 6b9fc74f2e1d..fd237ab120bb 100644 --- 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) |