public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: rnayak@ti.com
Cc: linux-serial@vger.kernel.org
Subject: re: omap-serial: Add minimal device tree support
Date: Wed, 6 Nov 2013 14:59:44 +0300	[thread overview]
Message-ID: <20131106115944.GA12410@elgon.mountain> (raw)

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


                 reply	other threads:[~2013-11-06 11:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131106115944.GA12410@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=rnayak@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox