aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/spi
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-09-21 10:09:39 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-24 17:59:08 -0200
commitdf94121f02ecce435d6b5277071eb94b764caa89 (patch)
tree798604b70206ee2c82a1fc7c0d3bffb961a14031 /drivers/media/spi
parent[media] gs1662: remove .owner field for driver (diff)
downloadwireguard-linux-df94121f02ecce435d6b5277071eb94b764caa89.tar.xz
wireguard-linux-df94121f02ecce435d6b5277071eb94b764caa89.zip
[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>
Diffstat (limited to 'drivers/media/spi')
-rw-r--r--drivers/media/spi/gs1662.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c
index 057530bf8528..330dcb2b2e44 100644
--- a/drivers/media/spi/gs1662.c
+++ b/drivers/media/spi/gs1662.c
@@ -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;
}