From: Simon Horman <horms@kernel.org>
To: "Stefan Mätje" <Stefan.Maetje@esd.eu>
Cc: "wg@grandegger.com" <wg@grandegger.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mkl@pengutronix.de" <mkl@pengutronix.de>,
"kuba@kernel.org" <kuba@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>
Subject: Re: [PATCH v8 2/2] can: esd: add support for esd GmbH PCIe/402 CAN interface family
Date: Wed, 8 Nov 2023 10:23:11 -0500 [thread overview]
Message-ID: <20231108152311.GD173253@kernel.org> (raw)
In-Reply-To: <1a1d0f4257cd980c58b6e2f83e2456dde5fe9441.camel@esd.eu>
On Tue, Nov 07, 2023 at 01:27:34PM +0000, Stefan Mätje wrote:
> Am Freitag, dem 03.11.2023 um 16:48 +0000 schrieb Simon Horman:
> > On Wed, Oct 25, 2023 at 04:16:35PM +0200, Stefan Mätje wrote:
> > > This patch adds support for the PCI based PCIe/402 CAN interface family
> > > from esd GmbH that is available with various form factors
> > > (https://esd.eu/en/products/402-series-can-interfaces).
> > >
> > > All boards utilize a FPGA based CAN controller solution developed
> > > by esd (esdACC). For more information on the esdACC see
> > > https://esd.eu/en/products/esdacc.
> > >
> > > This driver detects all available CAN interface board variants of
> > > the family but atm. operates the CAN-FD capable devices in
> > > Classic-CAN mode only! A later patch will introduce the CAN-FD
> > > functionality in this driver.
> > >
> > > Co-developed-by: Thomas Körper <thomas.koerper@esd.eu>
> > > Signed-off-by: Thomas Körper <thomas.koerper@esd.eu>
> > > Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
> >
> > ...
> >
> > > +static int pci402_probe(struct pci_dev *pdev, const struct pci_device_id
> > > *ent)
> > > +{
> > > + struct pci402_card *card = NULL;
> > > + int err;
> > > +
> > > + err = pci_enable_device(pdev);
> > > + if (err)
> > > + return err;
> > > +
> > > + card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL);
> > > + if (!card)
> >
> > Hi Thomas and Stefan,
> >
> > If this condition is met then the function will return err,
> > but err is set to 0. Perhaps it should be set to an error value here?
> >
> > Flagged by Smatch.
>
> Hi Simon,
>
> thank you for reviewing this. Looking at the code it is apparently wrong.
>
> I was not aware of smatch. I got a copy and could reproduce the error report.
> This will add another tool of static code analysis to my release routine.
>
> An upgraded patch with a fix will follow.
Thanks Stefan, that sounds good to me on both counts.
...
prev parent reply other threads:[~2023-11-08 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 14:16 [PATCH v8 0/2] can: esd: add support for esd GmbH PCIe/402 CAN interface Stefan Mätje
2023-10-25 14:16 ` [PATCH v8 1/2] MAINTAINERS: add Stefan Mätje as maintainer for the esd electronics GmbH PCIe/402 CAN drivers Stefan Mätje
2023-10-25 14:16 ` [PATCH v8 2/2] can: esd: add support for esd GmbH PCIe/402 CAN interface family Stefan Mätje
2023-11-03 16:48 ` Simon Horman
2023-11-07 13:27 ` Stefan Mätje
2023-11-08 15:23 ` Simon Horman [this message]
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=20231108152311.GD173253@kernel.org \
--to=horms@kernel.org \
--cc=Stefan.Maetje@esd.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wg@grandegger.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).