Category: Linux

mmc: vub300: 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 …

Continue reading

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 …

Continue reading

[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 …

Continue reading

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 …

Continue reading

[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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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; …

Continue reading

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; …

Continue reading

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; …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.