Commit 909275bc authored by Roel Kluin's avatar Roel Kluin Committed by Dmitry Torokhov

Input: altera_ps2 - fix test of unsigned in altera_ps2_probe()

ps2if->irq is unsigned so the test does not work.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent d201fd5d
...@@ -83,7 +83,7 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev) ...@@ -83,7 +83,7 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev)
{ {
struct ps2if *ps2if; struct ps2if *ps2if;
struct serio *serio; struct serio *serio;
int error; int error, irq;
ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL); ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL);
serio = kzalloc(sizeof(struct serio), GFP_KERNEL); serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
...@@ -108,11 +108,13 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev) ...@@ -108,11 +108,13 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev)
goto err_free_mem; 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; error = -ENXIO;
goto err_free_mem; goto err_free_mem;
} }
ps2if->irq = irq;
if (!request_mem_region(ps2if->iomem_res->start, if (!request_mem_region(ps2if->iomem_res->start,
resource_size(ps2if->iomem_res), pdev->name)) { resource_size(ps2if->iomem_res), pdev->name)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment