All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] TDA1997x: fix tda1997x_remove()
@ 2021-07-26 10:44 Krzysztof Hałasa
  2021-07-29  9:55 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Hałasa @ 2021-07-26 10:44 UTC (permalink / raw)
  To: Tim Harvey; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

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@piap.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:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-29 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 10:44 [PATCH] TDA1997x: fix tda1997x_remove() Krzysztof Hałasa
2021-07-29  9:55 ` Hans Verkuil
2021-07-29 11:07   ` Krzysztof Hałasa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.