diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-14 12:58:35 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-08-15 11:58:21 -0700 |
commit | 51fa3ca37e3bebb291dbe50faa3cb259af35e978 (patch) | |
tree | c02b24de81fcf80dffc5d02d2556706df42a684b /lib/vsprintf.c | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) | |
download | op-kernel-dev-51fa3ca37e3bebb291dbe50faa3cb259af35e978.zip op-kernel-dev-51fa3ca37e3bebb291dbe50faa3cb259af35e978.tar.gz |
IB/qib: Fix error return code in qib_init_7322_variables()
Convert a 0 error return code to a negative one, as returned elsewhere
in the function.
A simplified version of the semantic match that finds this 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.Lawall@lip6.fr>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'lib/vsprintf.c')
0 files changed, 0 insertions, 0 deletions