media: vidtv: use vfree() for memory allocated with vzalloc()
authorYihao Han <hanyihao@vivo.com>
Tue, 8 Mar 2022 09:41:32 +0000 (10:41 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 18 Mar 2022 06:28:17 +0000 (07:28 +0100)
It is allocated with vzalloc(), the corresponding release function
should not be kfree(), use vfree() instead.

Generated by: scripts/coccinelle/api/kfree_mismatch.cocci

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/test-drivers/vidtv/vidtv_s302m.c

index 4676083..9da18ea 100644 (file)
@@ -501,7 +501,7 @@ struct vidtv_encoder
        return e;
 
 out_kfree_buf:
-       kfree(e->encoder_buf);
+       vfree(e->encoder_buf);
 
 out_kfree_e:
        kfree(e->name);