Patchwork mtd: spear_smi: fix compilation warning

login
register
mail settings
Submitter Artem Bityutskiy
Date Aug. 17, 2012, 10:08 a.m.
Message ID <1345198090-12619-1-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/178181/
State Accepted
Commit 036a1ac1f4ac8cdfed4574738c63aba2e81a13e4
Headers show

Comments

Artem Bityutskiy - Aug. 17, 2012, 10:08 a.m.
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

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]

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---

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(-)

Patch

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 7c10466..421bc65 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -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;