drivers/usb/host/ohci-platform.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Convert a possibly 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return …

Continue reading

drivers/usb/wusbcore/wa-hc.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

drivers/tty/moxa.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

drivers/usb/gadget/s3c-hsotg.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

usb: gadget: s3c-hsotg.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference

Author: Julia Lawall <Julia.Lawall@lip6.fr> If the NULL test is necessary, the initialization involving a dereference of the tested value should be moved after the NULL test. The sematic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; expression E; identifier i,fld; statement S; @@ – T i = E->fld; + T …

Continue reading

drivers/net/ethernet/mellanox/mlx4/mcg.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

drivers/net/ethernet/freescale/fs_enet: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …

Continue reading

staging:iio: Constify static iio_chan_spec arrays

Author: Lars-Peter Clausen <lars@metafoo.de> The per driver iio_chan_spec arrays are usually shared between multiple device instances. So a single device instance may not modify the iio_chan_spec array since this would also affect the other device instances. To make this restriction explicit mark the per driver iio_chan_spec arrays as const. Conversion was done automatically using the …

Continue reading

drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Dave Airlie — drivers/gpu/drm/udl/udl_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 7bd65bd..291ecc1 100644 — a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ …

Continue reading