From 064fd169c508ce20e35babdd82946dab7219ccc5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 11 Apr 2013 13:25:10 -0300 Subject: [PATCH] [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 --- drivers/media/tuners/r820t.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.30.2