https://github.com/torvalds/linux
Revision 34948a36a4bbf583bf39b5c9783aa9e872c7910d authored by Uwe Kleine-König on 07 November 2023, 09:17:59 UTC, committed by Helge Deller on 10 November 2023, 06:34:19 UTC
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önig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Helge Deller <deller@gmx.de>
1 parent ebfb133
Raw File
Tip revision: 34948a36a4bbf583bf39b5c9783aa9e872c7910d authored by Uwe Kleine-König on 07 November 2023, 09:17:59 UTC
fbdev: omapfb/hdmi: Convert to platform remove callback returning void
Tip revision: 34948a3
COPYING
The Linux Kernel is provided under:

	SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note

Being under the terms of the GNU General Public License version 2 only,
according with:

	LICENSES/preferred/GPL-2.0

With an explicit syscall exception, as stated at:

	LICENSES/exceptions/Linux-syscall-note

In addition, other licenses may also apply. Please see:

	Documentation/process/license-rules.rst

for more details.

All contributions to the Linux Kernel are subject to this COPYING file.
back to top