re: omap-serial: Add minimal device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux