From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] lib: Add generic PIO mapping method
Date: Wed, 04 Apr 2018 12:41:52 +0000 [thread overview]
Message-ID: <20180404124152.GA3567@mwanda> (raw)
Hello Zhichang Yuan,
This is a semi-automatic email about new static checker warnings.
The patch 07a1cb330513: "lib: Add generic PIO mapping method" from
Mar 15, 2018, leads to the following Smatch complaint:
lib/logic_pio.c:42 logic_pio_register_range()
warn: variable dereferenced before check 'new_range' (see line 36)
lib/logic_pio.c
35 struct logic_pio_hwaddr *range;
36 resource_size_t start = new_range->hw_start;
^^^^^^^^^^^^^^^^^^^^
37 resource_size_t end = new_range->hw_start + new_range->size;
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Dereference.
38 resource_size_t mmio_sz = 0;
39 resource_size_t iio_sz = MMIO_UPPER_LIMIT;
40 int ret = 0;
41
42 if (!new_range || !new_range->fwnode || !new_range->size)
^^^^^^^^^
Check for NULL.
43 return -EINVAL;
44
regards,
dan carpenter
next reply other threads:[~2018-04-04 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 12:41 Dan Carpenter [this message]
2018-04-04 13:44 ` [bug report] lib: Add generic PIO mapping method Bjorn Helgaas
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=20180404124152.GA3567@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/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 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.