summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHussam Al-Tayeb <ht990332@gmail.com>2011-02-21 15:20:26 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-29 11:45:52 -0300
commit88fda5619e6cd7988dc1d9a52f2da9ee8fd0e64d (patch)
tree36df1029bb38a8960132e3823811caa5d0e49791
parent23ef710e1a6c4d6b9ef1c2fa19410f7f1479401e (diff)
downloadlinux-stable-88fda5619e6cd7988dc1d9a52f2da9ee8fd0e64d.tar.gz
linux-stable-88fda5619e6cd7988dc1d9a52f2da9ee8fd0e64d.tar.bz2
linux-stable-88fda5619e6cd7988dc1d9a52f2da9ee8fd0e64d.zip
[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>
-rw-r--r--drivers/media/rc/rc-main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 9f0a2d9f3d1e..33afd98938da 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -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 */