Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: 7aae6e2df127 ("[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>

authored by

Wei Yongjun and committed by
Mauro Carvalho Chehab
df94121f b7491e7e

+1 -2
+1 -2
drivers/media/spi/gs1662.c
··· 453 453 static int gs_remove(struct spi_device *spi) 454 454 { 455 455 struct v4l2_subdev *sd = spi_get_drvdata(spi); 456 - struct gs *gs = to_gs(sd); 457 456 458 457 v4l2_device_unregister_subdev(sd); 459 - kfree(gs); 458 + 460 459 return 0; 461 460 } 462 461