Skip to content

Commit

Permalink
tty: serial: bfin_sport_uart: fix signedness error
Browse files Browse the repository at this point in the history
sport->port.irq is unsigned, check for <0 doesn't make sense.
Explicitly cast it to int to check for error.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Feb 3, 2011
1 parent ebf5382 commit 940f3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/bfin_sport_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static int __devinit sport_uart_probe(struct platform_device *pdev)
sport->port.mapbase = res->start;

sport->port.irq = platform_get_irq(pdev, 0);
if (sport->port.irq < 0) {
if ((int)sport->port.irq < 0) {
dev_err(&pdev->dev, "No sport RX/TX IRQ specified\n");
ret = -ENOENT;
goto out_error_unmap;
Expand Down

0 comments on commit 940f3be

Please sign in to comment.