[Patch] Dead code in mtd/maps/pci.c

From: Eric Sesterhenn
Date: Tue Mar 07 2006 - 15:10:07 EST


hi,

this fixed coverity bug #12. The first two gotos
in the function still have the initial value for mtd set.
And the third goto just triggers for !mtd

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>

--- linux-2.6.16-rc5-mm1/drivers/mtd/maps/pci.c.orig 2006-03-07 21:08:08.000000000 +0100
+++ linux-2.6.16-rc5-mm1/drivers/mtd/maps/pci.c 2006-03-07 21:08:23.000000000 +0100
@@ -334,9 +334,6 @@ mtd_pci_probe(struct pci_dev *dev, const
return 0;

release:
- if (mtd)
- map_destroy(mtd);
-
if (map) {
map->exit(dev, map);
kfree(map);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/