* re: omap-serial: Add minimal device tree support
@ 2013-11-06 11:59 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-11-06 11:59 UTC (permalink / raw)
To: rnayak; +Cc: linux-serial
Hello Rajendra Nayak,
The patch d92b0dfc5078: "omap-serial: Add minimal device tree support"
from Dec 14, 2011, leads to the following Smatch warning:
"drivers/tty/serial/omap-serial.c:1700 serial_omap_probe()
warn: unsigned 'up->port.line' is never less than zero."
drivers/tty/serial/omap-serial.c
1695 if (pdev->dev.of_node)
1696 up->port.line = of_alias_get_id(pdev->dev.of_node, "serial");
1697 else
1698 up->port.line = pdev->id;
1699
1700 if (up->port.line < 0) {
^^^^^^^^^^^^^^^^^
This condition is never true because "up->port.line" is unsigned.
1701 dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n",
1702 up->port.line);
1703 ret = -ENODEV;
1704 goto err_port_line;
1705 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-06 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 11:59 omap-serial: Add minimal device tree support Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.