mtd: spear_smi: fix compilation warning

Submitted by Artem Bityutskiy on Aug. 17, 2012, 10:08 a.m.

Details

Message ID 1345198090-12619-1-git-send-email-dedekind1@gmail.com
State Accepted
Commit 036a1ac1f4ac8cdfed4574738c63aba2e81a13e4
Headers show

Commit Message

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 hide | download patch | download mbox

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;