mirror of https://github.com/torvalds/linux.git
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@diku.dk> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Kconfig.arm | ||
| Kconfig.powerpc | ||
| Kconfig.x86 | ||
| Makefile | ||
| acpi-cpufreq.c | ||
| cpufreq-nforce2.c | ||
| cpufreq.c | ||
| cpufreq_conservative.c | ||
| cpufreq_ondemand.c | ||
| cpufreq_performance.c | ||
| cpufreq_powersave.c | ||
| cpufreq_stats.c | ||
| cpufreq_userspace.c | ||
| db8500-cpufreq.c | ||
| e_powersaver.c | ||
| elanfreq.c | ||
| exynos-cpufreq.c | ||
| exynos4x12-cpufreq.c | ||
| exynos4210-cpufreq.c | ||
| exynos5250-cpufreq.c | ||
| freq_table.c | ||
| gx-suspmod.c | ||
| longhaul.c | ||
| longhaul.h | ||
| longrun.c | ||
| maple-cpufreq.c | ||
| mperf.c | ||
| mperf.h | ||
| omap-cpufreq.c | ||
| p4-clockmod.c | ||
| pcc-cpufreq.c | ||
| powernow-k6.c | ||
| powernow-k7.c | ||
| powernow-k7.h | ||
| powernow-k8.c | ||
| powernow-k8.h | ||
| s3c64xx-cpufreq.c | ||
| s3c2416-cpufreq.c | ||
| s5pv210-cpufreq.c | ||
| sc520_freq.c | ||
| speedstep-centrino.c | ||
| speedstep-ich.c | ||
| speedstep-lib.c | ||
| speedstep-lib.h | ||
| speedstep-smi.c | ||