aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <[email protected]>2016-02-17 20:41:03 +0530
committerGreg Kroah-Hartman <[email protected]>2016-02-19 17:00:07 -0800
commitfe747f0f34c638b639e1158f62c5d2f7a6d589c9 (patch)
tree06bb6483b0b79845c5a9c0bad1f17b3c8fed72cf /tools/perf/scripts/python
parent8459af6acf4a18ea6c9729499438a5482fb24dae (diff)
staging: wilc1000: Return correct error codes
This change has been made with the goal that kernel functions should return something more descriptive than -1 on failure. The return value on an alloc_etherdev failure should be -ENOMEM, and not -1. This was found using Coccinelle. A simplified version of the semantic patch used is: //<smpl> @@ expression *e; identifier l1; @@ e = alloc_etherdev(...); if (e == NULL) { ... return - -1 + -ENOMEM ; } //</smpl Furthermore, introduced `ret` variable to store and return the corresponding error code returned by register_netdev on failure. The two call sites store the return value in a variable which only checks that the value is non-zero, hence no change is required at the call sites. Signed-off-by: Amitoj Kaur Chawla <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions