Author: Lars-Peter Clausen <lars@metafoo.de> The SPI drvdata is set to adis16260_state struct in probe(), but assumed to be the iio_dev struct in remove(). Fix this by setting it to the iio_dev in probe(). The issue has been discovered using the following coccinelle patch: // @r1@ type T; T data; expression dev; @@ ( spi_set_drvdata(dev, (void …
Category: Linux
Jul 11 2012
mtd: spear_smi: failure test for null rather than negative integer
Author: Julia Lawall <Julia.Lawall@lip6.fr> dev_get_platdata returns a pointer, so the failure value would be NULL rather than a negative integer. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @@ expression x,e; statement S1,S2; @@ *x = dev_get_platdata(…) … when != x = e *if (x < 0) S1 else S2 // Signed-off-by: Julia …
Jul 09 2012
UBIFS: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. Replace a field access from orphan by NULL …
Jul 08 2012
iommu/tegra: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. Replace c->dev by dev, which is the value …
Jul 08 2012
slub: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. The patch replaces s->name by al->name, which is …
Jul 08 2012
drivers/net/ethernet/broadcom/cnic.c: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. There does not seem to be a meaningful …
Jul 08 2012
net/rxrpc/ar-peer.c: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. This seems to be a copy-paste bug from …
Jul 08 2012
drivers/isdn/mISDN/stack.c: remove invalid reference to list iterator variable
Author: Julia Lawall <Julia.Lawall@lip6.fr> If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. The dereferences are just deleted from the debugging …
Jul 03 2012
driver-core: Move kobj_to_dev from genhd.h to device.h
Author: Lars-Peter Clausen <lars@metafoo.de> This function is not really specific to the genhd layer and there are various re-implementations or open-coded variants of it all throughout the kernel. To avoid further duplications move the function to a more generic place. While moving also convert it from a macro to a inline function. Potential users of …
Jun 26 2012
iio:adc:at91: Relase mutex on error path in at91_adc_read_raw
Author: Lars-Peter Clausen <lars@metafoo.de> This issue was reported by the mini_lock.cocci coccinelle semantic patch. Signed-off-by: Lars-Peter Clausen Acked-by: Maxime Ripard Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman — drivers/iio/adc/at91_adc.c | 6 ++++– 1 file changed, 4 insertions(+), 2 deletions(-) diff –git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 6a08469..f61780a 100644 — a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -349,9 +349,11 @@ static …