From: Dan Carpenter <dan.carpenter@oracle.com>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>
Subject: Re: [PATCH] PCI: imx: Fix an IS_ERR() vs NULL bug
Date: Tue, 18 Dec 2018 11:02:45 +0000 [thread overview]
Message-ID: <20181218110245.GH19692@kadam> (raw)
In-Reply-To: <9ba5927dd322732b73f1fa0852ec20fdf918ba7b.camel@nxp.com>
On Tue, Dec 18, 2018 at 08:54:36AM +0000, Leonard Crestez wrote:
> On Tue, 2018-12-18 at 11:23 +0300, Dan Carpenter wrote:
> > The device_link_add() function doesn't return error pointers, it returns
> > NULL if there is an error.
> >
> > Fixes: 7a6991159bcd ("PCI: imx: Add multi-pd support")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
>
> I assume this was found with a static checker?
It's an unpublished Smatch check... It complains about running IS_ERR()
on things which aren't an error pointer. The problem is that that
happens all the time intentionally so i haven't published it. I should
probably make a version which only complains if it is an assignment from
a function that returns NULL.
(Even then it's problematic because it can depend on the .config)
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Richard Zhu <hongxing.zhu@nxp.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] PCI: imx: Fix an IS_ERR() vs NULL bug
Date: Tue, 18 Dec 2018 14:02:45 +0300 [thread overview]
Message-ID: <20181218110245.GH19692@kadam> (raw)
In-Reply-To: <9ba5927dd322732b73f1fa0852ec20fdf918ba7b.camel@nxp.com>
On Tue, Dec 18, 2018 at 08:54:36AM +0000, Leonard Crestez wrote:
> On Tue, 2018-12-18 at 11:23 +0300, Dan Carpenter wrote:
> > The device_link_add() function doesn't return error pointers, it returns
> > NULL if there is an error.
> >
> > Fixes: 7a6991159bcd ("PCI: imx: Add multi-pd support")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
>
> I assume this was found with a static checker?
It's an unpublished Smatch check... It complains about running IS_ERR()
on things which aren't an error pointer. The problem is that that
happens all the time intentionally so i haven't published it. I should
probably make a version which only complains if it is an assignment from
a function that returns NULL.
(Even then it's problematic because it can depend on the .config)
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>
Subject: Re: [PATCH] PCI: imx: Fix an IS_ERR() vs NULL bug
Date: Tue, 18 Dec 2018 14:02:45 +0300 [thread overview]
Message-ID: <20181218110245.GH19692@kadam> (raw)
In-Reply-To: <9ba5927dd322732b73f1fa0852ec20fdf918ba7b.camel@nxp.com>
On Tue, Dec 18, 2018 at 08:54:36AM +0000, Leonard Crestez wrote:
> On Tue, 2018-12-18 at 11:23 +0300, Dan Carpenter wrote:
> > The device_link_add() function doesn't return error pointers, it returns
> > NULL if there is an error.
> >
> > Fixes: 7a6991159bcd ("PCI: imx: Add multi-pd support")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
>
> I assume this was found with a static checker?
It's an unpublished Smatch check... It complains about running IS_ERR()
on things which aren't an error pointer. The problem is that that
happens all the time intentionally so i haven't published it. I should
probably make a version which only complains if it is an assignment from
a function that returns NULL.
(Even then it's problematic because it can depend on the .config)
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-18 11:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 8:23 [PATCH] PCI: imx: Fix an IS_ERR() vs NULL bug Dan Carpenter
2018-12-18 8:23 ` Dan Carpenter
2018-12-18 8:23 ` Dan Carpenter
2018-12-18 8:54 ` Leonard Crestez
2018-12-18 8:54 ` Leonard Crestez
2018-12-18 8:54 ` Leonard Crestez
2018-12-18 11:02 ` Dan Carpenter [this message]
2018-12-18 11:02 ` Dan Carpenter
2018-12-18 11:02 ` Dan Carpenter
2018-12-18 10:57 ` Lorenzo Pieralisi
2018-12-18 10:57 ` Lorenzo Pieralisi
2018-12-18 10:57 ` Lorenzo Pieralisi
2018-12-18 11:03 ` Dan Carpenter
2018-12-18 11:03 ` Dan Carpenter
2018-12-18 11:03 ` Dan Carpenter
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=20181218110245.GH19692@kadam \
--to=dan.carpenter@oracle.com \
--cc=bhelgaas@google.com \
--cc=hongxing.zhu@nxp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=l.stach@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.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 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.