Эх сурвалжийг харах

[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 <mchehab@redhat.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Mauro Carvalho Chehab 12 жил өмнө
parent
commit
064fd169c5

+ 4 - 0
drivers/media/tuners/r820t.c

@@ -1298,6 +1298,10 @@ static int r820t_standby(struct r820t_priv *priv)
 {
 {
 	int rc;
 	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);
 	rc = r820t_write_reg(priv, 0x06, 0xb1);
 	if (rc < 0)
 	if (rc < 0)
 		return rc;
 		return rc;