Fix bad return value checks (detected with Coccinelle)
In the "Getting Started with Coccinelle - KVM edition" presentation that has been held by Julia Lawall at the KVM forum 2015 (see the slides at http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf ), she pointed out some bad return value checks in U-Boot that can be detected with Coccinelle by using the following config file: @@ identifier x,y; identifier f; statement S; @@ x = f(...); ( if (x < 0) S | if ( - y + x < 0) S ) This patch now fixes these issues. Signed-off-by:Thomas Huth <huth@tuxfamily.org>
Showing
- board/samsung/origen/tools/mkorigenspl.c 1 addition, 1 deletionboard/samsung/origen/tools/mkorigenspl.c
- board/samsung/smdkv310/tools/mksmdkv310spl.c 1 addition, 1 deletionboard/samsung/smdkv310/tools/mksmdkv310spl.c
- drivers/hwmon/lm81.c 1 addition, 1 deletiondrivers/hwmon/lm81.c
- tools/fit_check_sign.c 1 addition, 1 deletiontools/fit_check_sign.c
- tools/mkexynosspl.c 1 addition, 1 deletiontools/mkexynosspl.c
Loading
Please register or sign in to comment