mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
[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>
This commit is contained in:
parent
801c73c04a
commit
b395cbac36
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user