]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] em28xx: fix PCTV 290e LNA oops
authorAntti Palosaari <crope@iki.fi>
Tue, 11 Mar 2014 09:53:16 +0000 (06:53 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 28 Mar 2014 21:11:01 +0000 (18:11 -0300)
Pointer to device state has been moved to different location during
some change. PCTV 290e LNA function still uses old pointer, carried
over FE priv, and it crash.

Reported-by: Janne Kujanpää <jikuja@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-dvb.c

index d6ec572a8a6cecb96bc1bd6fc059a9b923af98e1..71e1fcac050008ab366667576c5a915901bba342 100644 (file)
@@ -717,7 +717,8 @@ static void pctv_520e_init(struct em28xx *dev)
 static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe)
 {
        struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-       struct em28xx *dev = fe->dvb->priv;
+       struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
+       struct em28xx *dev = i2c_bus->dev;
 #ifdef CONFIG_GPIOLIB
        struct em28xx_dvb *dvb = dev->dvb;
        int ret;