From: viro@ZenIV.linux.org.uk (Al Viro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] perf: xgene: Remove bogus IS_ERR() check
Date: Thu, 13 Oct 2016 19:18:37 +0100 [thread overview]
Message-ID: <20161013181837.GQ19539@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1476382156-11641-1-git-send-email-ttnguyen@apm.com>
On Thu, Oct 13, 2016 at 11:09:16AM -0700, Tai Nguyen wrote:
> In acpi_get_pmu_hw_inf we pass the address of a local variable to IS_ERR(),
> which doesn't make sense, as the pointer must be a real, valid pointer.
> This doesn't cause a functional problem, as IS_ERR() will evaluate as
> false, but the check is bogus and causes static checkers to complain.
... unless the test is actually a misspelled IS_ERR(res) and the current
code is broken by effectively skipping it.
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tai Nguyen <ttnguyen@apm.com>
Cc: mark.rutland@arm.com, dan.carpenter@oracle.com,
will.deacon@arm.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] perf: xgene: Remove bogus IS_ERR() check
Date: Thu, 13 Oct 2016 19:18:37 +0100 [thread overview]
Message-ID: <20161013181837.GQ19539@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1476382156-11641-1-git-send-email-ttnguyen@apm.com>
On Thu, Oct 13, 2016 at 11:09:16AM -0700, Tai Nguyen wrote:
> In acpi_get_pmu_hw_inf we pass the address of a local variable to IS_ERR(),
> which doesn't make sense, as the pointer must be a real, valid pointer.
> This doesn't cause a functional problem, as IS_ERR() will evaluate as
> false, but the check is bogus and causes static checkers to complain.
... unless the test is actually a misspelled IS_ERR(res) and the current
code is broken by effectively skipping it.
next prev parent reply other threads:[~2016-10-13 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 18:09 [PATCH v2] perf: xgene: Remove bogus IS_ERR() check Tai Nguyen
2016-10-13 18:09 ` Tai Nguyen
2016-10-13 18:18 ` Al Viro [this message]
2016-10-13 18:18 ` Al Viro
2016-10-14 0:34 ` Mark Rutland
2016-10-14 0:34 ` Mark Rutland
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=20161013181837.GQ19539@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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.