Skip to contentSkip to conversation

mtd: spear_smi: fix compilation warning

PATCH New Artem Bityutskiy 1 participant 1 message Aug 17, 2012 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: spear_smi: fix compilation warning

From: Artem Bityutskiy <[email protected]>

drivers/mtd/devices/spear_smi.c: In function 'spear_smi_probe':
drivers/mtd/devices/spear_smi.c:984:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

---

Hi, I've just pushed this one to the l2-mtd.git tree.

 drivers/mtd/devices/spear_smi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/devices/spear_smi.c +1 -1
index 7c10466..421bc65 100644
@@ -981,7 +981,7 @@ static int __devinit spear_smi_probe(struct platform_device *pdev)
 	dev->pdev = pdev;
 	dev->clk_rate = pdata->clk_rate;
 
-	if (dev->clk_rate < 0 || dev->clk_rate > SMI_MAX_CLOCK_FREQ)
+	if (dev->clk_rate > SMI_MAX_CLOCK_FREQ)
 		dev->clk_rate = SMI_MAX_CLOCK_FREQ;
 
 	dev->num_flashes = pdata->num_flashes;
Signature · 1 line
1.7.10.4