Author: Julia Lawall <Julia.Lawall@lip6.fr> Add missing usb_free_urb on failure path after usb_alloc_urb. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @km exists@ local idexpression e; expression e1,e2,e3; type T,T1; identifier f; @@ * e = usb_alloc_urb(…) … when any when != e = e1 when != e1 …
Category: Linux
Jul 24 2012
iommu/intel: add missing free_domain_mem
Author: Julia Lawall <Julia.Lawall@lip6.fr> Add missing free_domain_mem on failure path after alloc_domain. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @km exists@ local idexpression e; expression e1,e2,e3; type T,T1; identifier f; @@ * e = alloc_domain(…) … when any when != e = e1 when != e1 …
Jul 24 2012
[media] drivers/staging/media/easycap/easycap_main.c: add missing usb_free_urb
Author: Julia Lawall <Julia.Lawall@lip6.fr> Add missing usb_free_urb on failure path after usb_alloc_urb. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @km exists@ local idexpression e; expression e1,e2,e3; type T,T1; identifier f; @@ * e = usb_alloc_urb(…) … when any when != e = e1 when != e1 …
Jul 16 2012
PCI: hotplug: ensure a consistent return value in error case
Author: Julia Lawall <Julia.Lawall@lip6.fr> Typically, the return value desired for the failure of a function with an integer return value is a negative integer. In these cases, the return value is sometimes a negative integer and sometimes 0, due to a subsequent initialization of the return variable within the loop. A simplified version of the …
Jul 15 2012
[media] drivers/media/dvb/siano/smscoreapi.c: use list_for_each_entry
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use list_for_each_entry and perform some other induced simplifications. The semantic match that finds the opportunity for this reorganization is as follows: (http://coccinelle.lip6.fr/) // @@ struct list_head *pos; struct list_head *head; statement S; @@ *for (pos = (head)->next; pos != (head); pos = pos->next) S // Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho …
Jul 14 2012
arch/x86/kernel/kdebugfs.c: Ensure a consistent return value in error case
Author: Julia Lawall <Julia.Lawall@lip6.fr> Typically, the return value desired for the failure of a function with an integer return value is a negative integer. In these cases, the return value is sometimes a negative integer and sometimes 0, due to a subsequent initialization of the return variable within the loop. A simplified version of the …
Jul 14 2012
can: softing: softing_main: ensure a consistent return value in error case
Author: Julia Lawall <Julia.Lawall@lip6.fr> Typically, the return value desired for the failure of a function with an integer return value is a negative integer. In these cases, the return value is sometimes a negative integer and sometimes 0, due to a subsequent initialization of the return variable within the loop. A simplified version of the …
Jul 13 2012
staging:iio:tsl2x7x: Ensure request_irq and free_irq dev_id parameter match
Author: Lars-Peter Clausen <lars@metafoo.de> The data parameters for request_irq and free_irq have to match, otherwise the IRQ wont be freed. The issue has been discovered using the following coccinelle patch: // @r1@ type T; T data; @@ ( request_irq(…, (void *)data) | request_irq(…, data) | request_threaded_irq(…, (void *)data) | request_threaded_irq(…, data) ) @r2@ type r1.T; …
Jul 13 2012
staging:iio:lpc32xx_adc: Ensure request_irq and free_irq dev_id parameter match
Author: Lars-Peter Clausen <lars@metafoo.de> The data parameters for request_irq and free_irq have to match, otherwise the IRQ wont be freed. The issue has been discovered using the following coccinelle patch: // @r1@ type T; T data; @@ ( request_irq(…, (void *)data) | request_irq(…, data) | request_threaded_irq(…, (void *)data) | request_threaded_irq(…, data) ) @r2@ type r1.T; …
Jul 13 2012
staging:iio:tsl2x7x: Fix client data inconsistency
Author: Lars-Peter Clausen <lars@metafoo.de> In probe the I2C client data is set to the iio_dev struct in probe(), but assumed to be the tsl2X7X_chip struct in remove(). Fix this by reading the client data back as iio_dev as well. The issue has been discovered using the following coccinelle patch: // @r1@ type T; T data; …