Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/video: Move dereference after NULL test
If the NULL test on fbi is needed, then the dereference should be after the NULL 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 <[email protected]> Cc: Krzysztof Helt <[email protected]> Cc: Eric Miao <[email protected]> Cc: Daniel Mack <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information