lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241024-bald-orthodox-bloodhound-0ce66c-mkl@pengutronix.de>
Date: Thu, 24 Oct 2024 12:05:35 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Ming Yu <a0282524688@...il.com>
Cc: tmyu0@...oton.com, lee@...nel.org, mailhol.vincent@...adoo.fr, 
	linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v1 4/9] can: Add Nuvoton NCT6694 CAN support

On 24.10.2024 12:03:34, Marc Kleine-Budde wrote:
> Trimming Cc a bit
> 
> On 24.10.2024 16:59:17, Ming Yu wrote:
> > +static struct platform_driver nct6694_canfd_driver = {
> > +	.driver = {
> > +		.name	= DRVNAME,
> > +	},
> > +	.probe		= nct6694_canfd_probe,
> > +	.remove		= nct6694_canfd_remove,
> > +};
> > +
> > +static int __init nct6694_init(void)
> > +{
> > +	int err;
> > +
> > +	err = platform_driver_register(&nct6694_canfd_driver);
> > +	if (!err) {
>             ^^^^
> > +		if (err)
>                     ^^^
> 
> This look wrong.
> 
> > +			platform_driver_unregister(&nct6694_canfd_driver);
> 
> Why do you want to unregister if registering fails?

This is a pattern that repeats over all platform driver :/

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   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ