2021-04-15 09:06:14

by Marc Kleine-Budde

[permalink] [raw]
Subject: Re: [PATCH][next] can: etas_es58x: Fix missing null check on netdev pointer

On 15.04.2021 09:47:23, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> There is an assignment to *netdev that is can potentially be null but the
> null check is checking netdev and not *netdev as intended. Fix this by
> adding in the missing * operator.
>
> Addresses-Coverity: ("Dereference before null check")
> Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> Signed-off-by: Colin Ian King <[email protected]>

Looks good. Applied to linux-can-next/testing.

Tnx,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (837.00 B)
signature.asc (499.00 B)
Download all attachments

2021-04-15 11:44:06

by Vincent MAILHOL

[permalink] [raw]
Subject: Re: [PATCH][next] can: etas_es58x: Fix missing null check on netdev pointer

On Thu. 15 Apr 2021 at 18:04, Marc Kleine-Budde <[email protected]> wrote:
> On 15.04.2021 09:47:23, Colin King wrote:
> > From: Colin Ian King <[email protected]>
> >
> > There is an assignment to *netdev that is can potentially be null but the
^^
Typo: that is can -> that can

> > null check is checking netdev and not *netdev as intended. Fix this by
> > adding in the missing * operator.
> >
> > Addresses-Coverity: ("Dereference before null check")
> > Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> > Signed-off-by: Colin Ian King <[email protected]>

Acked-by: Vincent Mailhol <[email protected]>

Thanks Colin!

2021-04-15 11:48:33

by Marc Kleine-Budde

[permalink] [raw]
Subject: Re: [PATCH][next] can: etas_es58x: Fix missing null check on netdev pointer

On 15.04.2021 20:42:36, Vincent MAILHOL wrote:
> On Thu. 15 Apr 2021 at 18:04, Marc Kleine-Budde <[email protected]> wrote:
> > On 15.04.2021 09:47:23, Colin King wrote:
> > > From: Colin Ian King <[email protected]>
> > >
> > > There is an assignment to *netdev that is can potentially be null but the
> ^^
> Typo: that is can -> that can

Fixed.

> > > null check is checking netdev and not *netdev as intended. Fix this by
> > > adding in the missing * operator.
> > >
> > > Addresses-Coverity: ("Dereference before null check")
> > > Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> > > Signed-off-by: Colin Ian King <[email protected]>
>
> Acked-by: Vincent Mailhol <[email protected]>

Added to the patch.

Tnx,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (1.10 kB)
signature.asc (499.00 B)
Download all attachments