Skip to contentSkip to conversation

ata/sata_fsl: Remove unused variable in sata_fsl_probe

PATCH New Johann Felix Soden 1 participant 1 message Apr 6, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata/sata_fsl: Remove unused variable in sata_fsl_probe

From: Johann Felix Soden <[email protected]>

In sata_fsl_probe memory is allocated but never used or deallocated.
Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10404

Thanks to Daniel Marjamäki for the bug report.

---
 drivers/ata/sata_fsl.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/ata/sata_fsl.c +0 -3
index 4c19855..9d1e3ca 100644
@@ -1256,7 +1256,6 @@ static int sata_fsl_probe(struct of_device *ofdev,
 	void __iomem *ssr_base = NULL;
 	void __iomem *csr_base = NULL;
 	struct sata_fsl_host_priv *host_priv = NULL;
-	struct resource *r;
 	int irq;
 	struct ata_host *host;
 
@@ -1266,8 +1265,6 @@ static int sata_fsl_probe(struct of_device *ofdev,
 	dev_printk(KERN_INFO, &ofdev->dev,
 		   "Sata FSL Platform/CSB Driver init\n");
 
-	r = kmalloc(sizeof(struct resource), GFP_KERNEL);
-
 	hcr_base = of_iomap(ofdev->node, 0);
 	if (!hcr_base)
 		goto error_exit_with_cleanup;
Signature · 1 line
1.5.4.5