rc-core: fix remove uevent generation
authorDavid Härdeman <david@hardeman.nu>
Tue, 19 May 2015 22:03:12 +0000 (19:03 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2015 10:07:31 +0000 (12:07 +0200)
commit a66b0c41ad277ae62a3ae6ac430a71882f899557 upstream.

The input_dev is already gone when the rc device is being unregistered
so checking for its presence only means that no remove uevent will be
generated.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/rc/rc-main.c

index 1cf382a0b27761683f6afa4d8c07aed3904ed789..cf7bbb6c9807ddebac2e7c05d066acfdc8748806 100644 (file)
@@ -943,9 +943,6 @@ static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
 {
        struct rc_dev *dev = to_rc_dev(device);
 
-       if (!dev || !dev->input_dev)
-               return -ENODEV;
-
        if (dev->rc_map.name)
                ADD_HOTPLUG_VAR("NAME=%s", dev->rc_map.name);
        if (dev->driver_name)