aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMeghana Madhyastha <[email protected]>2017-09-16 10:34:05 +0530
committerGreg Kroah-Hartman <[email protected]>2017-09-18 11:50:40 +0200
commit08710da3cf932149de3440bbaec4dfdfba5a33df (patch)
treebe5692c1f6de7108e12acf573a304527ce72bd73 /tools/perf/scripts/python
parentf46cf70e2338899a241566aec3c30a4af5d5ba92 (diff)
Staging: speakup: Remove print following unsuccessful kmalloc
Remove print statement following unsuccessful kmalloc when there is not enough memory. Kmalloc and variants normally produce a backtrace in such a case. Hence, a print statement is not necessary. Found using the following Coccinelle semantic patch: @@ identifier i; @@ i = (\(kmalloc\|devm_kzalloc\|kmalloc_array\| devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)); ( if (i == NULL) { -\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } | if (!i) { -\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } ) @@ identifier i; @@ ( - if (i == NULL) { + if (i == NULL) return ...; - } | - if (!i) { + if (!i) return ...; - } ) Signed-off-by: Meghana Madhyastha <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions