[media] rc_core: avoid kernel oops when rmmod saa7134

The following is a patch to avoid a kernel oops when running rmmod
saa7134 on kernel 2.6.27.1. The change is as suggested by mchehab on
irc.freenode.org

Signed-off-by: Hussam Al-Tayeb <ht990332@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hussam Al-Tayeb 2011-02-21 15:20:26 -03:00 committed by Mauro Carvalho Chehab
parent 23ef710e1a
commit 88fda5619e

View file

@ -707,7 +707,8 @@ static void ir_close(struct input_dev *idev)
{
struct rc_dev *rdev = input_get_drvdata(idev);
rdev->close(rdev);
if (rdev)
rdev->close(rdev);
}
/* class for /sys/class/rc */