[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <m35ywxcq1l.fsf@t19.piap.pl>
Date: Mon, 26 Jul 2021 12:44:54 +0200
From: Krzysztof Hałasa <khalasa@...p.pl>
To: Tim Harvey <tharvey@...eworks.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] TDA1997x: fix tda1997x_remove()
TDA1997x I2C "client data" pointer was never set in tda1997x_probe(),
then the code tried to use invalid pointer in tda1997x_remove().
Signed-off-by: Krzysztof Hałasa <khalasa@...p.pl>
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index 71194746c874..043cc8275d00 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -2771,6 +2771,7 @@ static int tda1997x_probe(struct i2c_client *client,
goto err_free_media;
}
+ i2c_set_clientdata(client, sd);
return 0;
err_free_media:
Powered by blists - more mailing lists