mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
[media] gs1662: drop kfree for memory allocated with devm_kzalloc
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.
Fixes: 7aae6e2df1
("[media] Add GS1662 driver, a video serializer")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
b7491e7e90
commit
df94121f02
@ -453,10 +453,9 @@ static int gs_probe(struct spi_device *spi)
|
||||
static int gs_remove(struct spi_device *spi)
|
||||
{
|
||||
struct v4l2_subdev *sd = spi_get_drvdata(spi);
|
||||
struct gs *gs = to_gs(sd);
|
||||
|
||||
v4l2_device_unregister_subdev(sd);
|
||||
kfree(gs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user