summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-01-24 20:55:21 +0100
committerPaul Mundt <lethal@linux-sh.org>2011-01-25 07:09:24 +0100
commit5dc1365cefb6bd8770d54a2154097445c30fe4bc (patch)
tree90fac35b05750df169536d7b466aae0865ca3f59 /COPYING
parentvideo: pxa168fb: remove a redundant pxa168fb_check_var call (diff)
downloadlinux-5dc1365cefb6bd8770d54a2154097445c30fe4bc.tar.xz
linux-5dc1365cefb6bd8770d54a2154097445c30fe4bc.zip
drivers/video/bf537-lq035.c: Add missing IS_ERR test
lcd_device_register may return ERR_PTR, so a check is added for this value before the dereference. All of the other changes reorganize the error handling code in this function to avoid duplicating all of it in the added case. In the original code, in one case, the global variable fb_buffer was set to NULL in error code that appears after this variable is initialized. This is done now in all error handling code that has this property. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier f; @@ f(...) { ... return ERR_PTR(...); } @@ identifier r.f, fld; expression x; statement S1,S2; @@ x = f(...) ... when != IS_ERR(x) ( if (IS_ERR(x) ||...) S1 else S2 | *x->fld ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions