Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 064fd169 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: default avatarAntti Palosaari <crope@iki.fi>
parent 4176e7ea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;