From: Hussam Al-Tayeb Date: Mon, 21 Feb 2011 18:20:26 +0000 (-0300) Subject: [media] rc_core: avoid kernel oops when rmmod saa7134 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=88fda5619e6cd7988dc1d9a52f2da9ee8fd0e64d;p=linux-beck.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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 */