提交 df94121f 编写于 作者: W Wei Yongjun 提交者: Mauro Carvalho Chehab

[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: 7aae6e2d ("[media] Add GS1662 driver, a video serializer")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 b7491e7e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册