From: Eric Sesterhenn Date: Fri, 31 Mar 2006 10:29:50 +0000 (-0800) Subject: [PATCH] Dead code in mtd/maps/pci.c X-Git-Tag: v2.6.17-rc1~133 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edcbce2150fec1f6e6670e14eb65098eebfacae8;p=linux-2.6 [PATCH] Dead code in mtd/maps/pci.c This fixes 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 Cc: Thomas Gleixner Acked-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index 21822c2edb..d2ab1bae9c 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c @@ -334,9 +334,6 @@ mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) return 0; release: - if (mtd) - map_destroy(mtd); - if (map) { map->exit(dev, map); kfree(map);