Re: [PATCH] hte: tegra-194: Convert to platform remove callback returning void
"Thierry Reding" <[email protected]> Mon, 11 Mar 2024 17:04:05 +0100
| Newsgroups | dev.linux.lists.timestamp,org.kernel.vger.linux-tegra |
|---|---|
| Message-ID | <[email protected]> |
--a67836c0427bcb0ce7e2976400776a51e382e07418ed8532f736485bec42 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Fri Mar 8, 2024 at 9:51 AM CET, Uwe Kleine-K=C3=B6nig wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is ignored (apart > from emitting a warning) and this typically results in resource leaks. > > To improve here there is a quest to make the remove callback return > void. In the first step of this quest all drivers are converted to > .remove_new(), which already returns void. Eventually after all drivers > are converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-K=C3=B6nig <[email protected]> > --- > drivers/hte/hte-tegra194-test.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) Acked-by: Thierry Reding <[email protected]> --a67836c0427bcb0ce7e2976400776a51e382e07418ed8532f736485bec42 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmXvK3YACgkQ3SOs138+ s6HfcRAAo1TclDTpQAvLx8p+fqtLLph42rATzcRewTFPKzcvFVtSqgrJApanWri2 a+7Wx2QHOxA+Xrq/7z07ILjxbobztUFlQ4HN0/vhz1iUmhPcwJc7gyQhO7i80D/z 5Jb1uLd4jtSvEl8BJ5x3+vdDKcQDY33kwC0IMeniBrEBkw/G8vONNFyjHqU4xjh9 H5VvStZd/yxwd4ZlNGFI1PFBmtOtdZ8x6WPVQDuoHAj+AdwtTgA1t35NHlET+RtZ OHflL4fl6xlDm94/CpbM0Lxp7ynpGROMitbvx0AVh5V+sQFl4WXWlDDWuOSkiZd7 fgP6ysDO+7CdbRLw3QYtSW4DbRLFoIw3SdLIT379sziWN6vlEAjDt2JuvCuMNrj0 8pcOQhShvJO4B+rz/OO6fHuUrdcqEcIAsWxCfzJDyiJv1IrjSuQc+WB/m6fN/P2N bsPaxZkk3PBpcfniVUMw4x9IuKgtaD8SBgzH2/UWkfOqQ4xPZ1isV3y92jAbTOsH cSwGra5i6z997nvCpe2uCXOy5j+ZHSUdkbj9SLOUz9QxsRDJ9+2wrC0alQKcB0Uj a99szkJNlCUoLvWNeP/Sk5v8UaqsLoc8YNWiriu446Bee4lA6+IAhPntWsRuJtnt PXwBbOFS35c+zdA9Gh8OMb8iQiBrIiDs88willhGP4mQd1ull1M= =c35F -----END PGP SIGNATURE----- --a67836c0427bcb0ce7e2976400776a51e382e07418ed8532f736485bec42--