mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
d1bb4b29a7
Using devm_kzalloc simplifies the code and ensures that the use of devm_request_irq is safe. When kzalloc and kfree were used, the interrupt could be triggered after the handler's data argument had been freed. This also introduces some missing initializations of the return variable ret, and uses devm_request_and_ioremap instead of the combination of devm_request_mem_region and devm_ioremap. The problem of a free after a devm_request_irq was found using the following semantic match (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression e1,e2,x,a,b,c,d; identifier free; position p1,p2; @@ devm_request_irq@p1(e1,e2,...,x) ... when any when != e2 = a when != x = b if (...) { ... when != e2 = c when != x = d free@p2(...,x,...); ... return ...; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> |
||
---|---|---|
.. | ||
blackfin | ||
davinci | ||
marvell-ccic | ||
omap | ||
omap3isp | ||
s5p-fimc | ||
s5p-g2d | ||
s5p-jpeg | ||
s5p-mfc | ||
s5p-tv | ||
arv.c | ||
atmel-isi.c | ||
coda.c | ||
coda.h | ||
fsl-viu.c | ||
indycam.c | ||
indycam.h | ||
Kconfig | ||
m2m-deinterlace.c | ||
Makefile | ||
mem2mem_testdev.c | ||
mx1_camera.c | ||
mx2_camera.c | ||
mx2_emmaprp.c | ||
mx3_camera.c | ||
omap1_camera.c | ||
omap24xxcam-dma.c | ||
omap24xxcam.c | ||
omap24xxcam.h | ||
pxa_camera.c | ||
sh_mobile_ceu_camera.c | ||
sh_vou.c | ||
soc_camera_platform.c | ||
soc_camera.c | ||
soc_mediabus.c | ||
timblogiw.c | ||
via-camera.c | ||
via-camera.h | ||
vino.c | ||
vino.h | ||
vivi.c |