diff options
author | Julia Lawall <julia@diku.dk> | 2012-08-04 23:52:33 (GMT) |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-05 21:38:55 (GMT) |
commit | 12ecd9570d8941c15602a11725ec9b0ede48d6c2 (patch) | |
tree | e5a73f8d08601a3ef459fcf93a9e6f4ed0cb0611 /fs/jfs | |
parent | 55b665b0263ae88a776071306ef1eee4b769016b (diff) | |
download | linux-fsl-qoriq-12ecd9570d8941c15602a11725ec9b0ede48d6c2.tar.xz |
arch/powerpc/kvm/e500_tlb.c: fix error return code
Convert a 0 error return code to a negative one, as returned elsewhere in the
function.
A new label is also added to avoid freeing things that are known to not yet
be allocated.
A simplified version of the semantic match that finds the first problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@
(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
when != ret = e3
*if (x == NULL || ...)
{
... when != ret = e4
* return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'fs/jfs')
0 files changed, 0 insertions, 0 deletions