linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Fix test of unsigned in altera_ps2_probe()
@ 2009-12-15 17:02 Roel Kluin
  2009-12-15 17:52 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-12-15 17:02 UTC (permalink / raw)
  To: Dmitry Torokhov, Dmitry Torokhov, linux-input, Andrew Morton, LKML

ps2if->irq is unsigned so the test does not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Found using coccinelle: http://coccinelle.lip6.fr/

diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index f479ea5..3aa8f2e 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -83,7 +83,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
 {
 	struct ps2if *ps2if;
 	struct serio *serio;
-	int error;
+	int error, irq;
 
 	ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL);
 	serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
@@ -108,11 +108,13 @@ static int altera_ps2_probe(struct platform_device *pdev)
 		goto err_free_mem;
 	}
 
-	ps2if->irq  = platform_get_irq(pdev, 0);
-	if (ps2if->irq < 0) {
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
 		error = -ENXIO;
 		goto err_free_mem;
 	}
+	ps2if->irq = irq;
 
 	if (!request_mem_region(ps2if->iomem_res->start,
 				resource_size(ps2if->iomem_res), pdev->name)) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: Fix test of unsigned in altera_ps2_probe()
  2009-12-15 17:02 [PATCH] Input: Fix test of unsigned in altera_ps2_probe() Roel Kluin
@ 2009-12-15 17:52 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-12-15 17:52 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linux-input, Andrew Morton, LKML

On Tue, Dec 15, 2009 at 06:02:56PM +0100, Roel Kluin wrote:
> ps2if->irq is unsigned so the test does not work.
> 

Applied, tahnk you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-15 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-15 17:02 [PATCH] Input: Fix test of unsigned in altera_ps2_probe() Roel Kluin
2009-12-15 17:52 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).