From: Mauro Carvalho Chehab Date: Thu, 11 Apr 2013 16:25:10 +0000 (-0300) Subject: [media] r820t: Don't put it in standby if not initialized yet X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=064fd169c508ce20e35babdd82946dab7219ccc5;p=openwrt%2Fstaging%2Fblogic.git [media] r820t: Don't put it in standby if not initialized yet r820t_standby() can be called before r820t_init(). If that happens, just do nothing. Signed-off-by: Mauro Carvalho Chehab Tested-by: Antti Palosaari --- diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index fc660f27edb3..b679a3f1fb7a 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -1298,6 +1298,10 @@ static int r820t_standby(struct r820t_priv *priv) { int rc; + /* If device was not initialized yet, don't need to standby */ + if (!priv->init_done) + return 0; + rc = r820t_write_reg(priv, 0x06, 0xb1); if (rc < 0) return rc;