summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cpia.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-01 21:08:10 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-01 21:08:10 +0000
commitcd9d05db95ec6e49f6699151b1560b24af680689 (patch)
tree5bd291ddf15a19d0f8144fd5e9eb8878edb0e1ee /linux/drivers/media/video/cpia.c
parentf9b21f5047b96957a8e24bc7d8692be6af1929c0 (diff)
downloadmediapointer-dvb-s2-cd9d05db95ec6e49f6699151b1560b24af680689.tar.gz
mediapointer-dvb-s2-cd9d05db95ec6e49f6699151b1560b24af680689.tar.bz2
radio: Use video_device_release rather than kfree
From: Julia Lawall <julia@diku.dk> The file drivers/media/video/videodev.c defines both video_device_alloc and video_device_release. These are essentially just kzmalloc and kfree, respectively, but it seems better to use video_device_release, as done in the other media files, rather than kfree, in case the implementation some day changes. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T,T1,T2; identifier E; statement S; expression x1,x2,x3; int ret; @@ T E; ... * E = video_device_alloc(...); if (E == NULL) S ... when != video_device_release(...,(T1)E,...) when != if (E != NULL) { ... video_device_release(...,(T1)E,...); ...} when != x1 = (T1)E when != E = x3; when any if (...) { ... when != video_device_release(...,(T2)E,...) when != if (E != NULL) { ... video_device_release(...,(T2)E,...); ...} when != x2 = (T2)E ( * return; | * return ret; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cpia.c')
0 files changed, 0 insertions, 0 deletions