aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/floppy.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-12-14 18:00:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 08:53:25 -0800
commitfaa7b7ddca14887ac037f585d2fac7ca6c57037e (patch)
treea44e7785a83a9f778fe3acec2f6aa07630292b23 /drivers/block/floppy.c
parentconst: constify remaining dev_pm_ops (diff)
downloadlinux-dev-faa7b7ddca14887ac037f585d2fac7ca6c57037e.tar.xz
linux-dev-faa7b7ddca14887ac037f585d2fac7ca6c57037e.zip
drivers/cpuidle: Move dereference after NULL test
It does not seem possible that ldev can be NULL, so drop the unnecessary test. If ldev can somehow be NULL, then the initialization of last_idx should be moved below the test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/floppy.c')
0 files changed, 0 insertions, 0 deletions