aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorLars-Peter Clausen <[email protected]>2012-10-04 17:14:01 -0700
committerLinus Torvalds <[email protected]>2012-10-06 03:05:03 +0900
commita16e8393ac03cc24fd9b838f42823b4242ceac88 (patch)
tree138dac2dc48a180568e90464e561a8bae3237a89 /tools/perf/scripts/python/net_dropmonitor.py
parent7c6a52a090ce7f680077ed42326e11cf17e713dc (diff)
drivers/rtc/rtc-spear.c: fix several error checks
There are several comparisons of a unsigned int to less than zero int spear RTC driver. Such a check will always be true. In all these cases a signed int is assigned to the unsigned variable, which is checked, before. So the right fix is to make the checked variable signed as well. In one case the check can be dropped completely, because all it does it returns 'err' if 'err' is less than zero, otherwise it returns 0. Since in this particular case 'err' is always either 0 or less this is the same as just returning 'err'. The issue has been found using the following coccinelle semantic patch: //<smpl> @@ type T; unsigned T i; @@ ( *i < 0 | *i >= 0 ) //</smpl> Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions