]> git.baikalelectronics.ru Git - kernel.git/commit
[media] drivers/media/pci/saa7134/saa7134-dvb.c: Test if videobuf_dvb_get_frontend...
authorPeter Senna Tschudin <peter.senna@gmail.com>
Tue, 30 Oct 2012 14:09:41 +0000 (11:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 21 Dec 2012 19:43:22 +0000 (17:43 -0200)
commit560ba63b91438e1c0a69bc09137afbb63d15b437
treea2901516ae5c37bdd130b42690b55166b9c3072a
parentfee0d3ddc81df8983716c76251e71e1e672591c5
[media] drivers/media/pci/saa7134/saa7134-dvb.c: Test if videobuf_dvb_get_frontend return NULL

Based on commit: 403f0a5bdd8624e1fe7952e09548810c6dccdca1
Not testing videobuf_dvb_get_frontend output may cause OOPS if it return
NULL. This patch fixes this issue.
The semantic patch that found this issue is(http://coccinelle.lip6.fr/):
// <smpl>
@@
identifier i,a,b;
statement S, S2;
@@
i = videobuf_dvb_get_frontend(...);
... when != if (!i) S
* if (i->a.b)
S2
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/saa7134/saa7134-dvb.c