Re: [PATCH v2] b43legacy: Add checking for null for ssb_get_devtypedata(dev)

Michael Büsch <[email protected]>
Newsgroups org.infradead.lists.b43-dev,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless,org.kernel.vger.netdev
Message-ID <20230422192820.59e8e423@barney>
On Fri, 21 Apr 2023 17:14:18 -0500
Larry Finger <[email protected]> wrote:
> > (err) goto out;
> >   		wl = ssb_get_devtypedata(dev);
> > -		B43legacy_WARN_ON(!wl);
> > +		if (!wl) {
> > +			B43legacy_WARN_ON(!wl);
> > +			err = -ENODEV;
> > +			goto out;
> > +		}
> >   	}
> >   	err = b43legacy_one_core_attach(dev, wl);
> >   	if (err)  
> 
> I do not recall seeing v1. One additional nitpick: The latest
> convention would have the subject as "wifi: b43legacy:...". Kalle may
> be able to fix this on merging, but it not, a v3 might be required.
> Otherwise, the patch is good.
> 
> Reviewed-by: Larry Finger <[email protected]>

No, it's not good. It's wrong. I already replied to it.
wl can never be NULL here and the goto-out path is wrong (if there
was a chance for it to trigger).

Please drop this patch, Kalle.

-- 
Michael Büsch
https://bues.ch/

_______________________________________________
b43-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/b43-dev
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEihRzkKVZOnT2ipsS9TK+HZCNiw4FAmREGTUACgkQ9TK+HZCN
iw5QnxAAsP4FHvqBSFyCpRPrOwj512Kwf4RtO4TYNO/FC3zv09UAgjzILHDVJFDD
nPmFfNaPsGiVqDUHTIfuPzBYFMdvDsZyibynDU4Fv24YFNXx9YkrytMAZH+Rzh6t
4cID7MG82odxIJJP3ERs7vA0MX1HhD2cKR2BA2g6470gf1M1+EEqGt+xiu8Q09ja
rJNpcZB616jmOd3kCxRtSmEVuksPZfVYFFm3Nj77MIUiO/DlIcn2abkFPDMGYpOf
9GGCHTLc0DSTlZ2vTxmmnYQW/Jqhe6DAjjdY2v7OAN8Ma87VCKVWsCdjIKEhUSyf
vKY8uxLK9mG5wE8NSD7MqKNALqBewpEcHJy9FyVsxPdq92FpbqfkQh8sWRZFPDC0
kOT+Y9YqFaec9Ffe+jrISqN/lflkspnvCv4DJn2616NoaFa97zVMv43Oz+o5DYps
H5TcuwMr/xGlXxHOTRYlxZUFPNMlarkkv6ZoXrhBJncjgZROTRvwjbzgsEeRSO1+
OPUzTIIobbScYn3XNmNz85Ag8uBx/LrXqSW7F+N4dKyEhXs/EGXKjx/PnZIxSDNF
s05UhkHRz6N624hRVSEIOS7R4HuZQxIg83usyAkhTT/o58UsHd9sjrK1Tv63m+wE
XqbKdiC5cKgaN4Mhoeil2Cz6AZsSizVV4PYsAN7zGuk/iGOhC1Q=
=vx0A
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.