re: tty: serial: Add 8250-core based omap driver

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

 



Hello Sebastian Andrzej Siewior,

The patch 61929cf0169d: "tty: serial: Add 8250-core based omap
driver" from Sep 29, 2014, leads to the following static checker
warning:

	drivers/tty/serial/8250/8250_omap.c:1025 omap8250_probe()
	warn: unsigned 'up.port.line' is never less than zero.

drivers/tty/serial/8250/8250_omap.c
  1015  
  1016          if (pdev->dev.of_node) {
  1017                  up.port.line = of_alias_get_id(pdev->dev.of_node, "serial");
  1018                  of_property_read_u32(pdev->dev.of_node, "clock-frequency",
  1019                                       &up.port.uartclk);
  1020                  priv->wakeirq = irq_of_parse_and_map(pdev->dev.of_node, 1);
  1021          } else {
  1022                  up.port.line = pdev->id;
  1023          }
  1024  
  1025          if (up.port.line < 0) {
                    ^^^^^^^^^^^^^^^^
Impossible.

  1026                  dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n",
  1027                          up.port.line);
  1028                  return -ENODEV;
                        ^^^^^^^^^^^^^^
It's better to preserve the error code normally.

  1029          }

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