Re: [PATCH] can: raw: Remove NULL check before dev_{put, hold}

From: Marc Kleine-Budde
Date: Wed Oct 04 2023 - 06:26:14 EST


On 25.08.2023 14:46:56, Jiapeng Chong wrote:
> The call netdev_{put, hold} of dev_{put, hold} will check NULL, so there
> is no need to check before using dev_{put, hold}, remove it to silence
> the warning:
>
> ./net/can/raw.c:497:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed.
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6231
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>

Applied to linux-can-next/testing.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature