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: <1a4ba24-8bab-47b8-b25d-cc31ce16ca1f@linux-m68k.org>
Date:   Wed, 14 Jul 2021 11:12:05 +1000 (AEST)
From:   Finn Thain <fthain@...ux-m68k.org>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 5/5] bus: Make remove callback return void

On Tue, 13 Jul 2021, Uwe Kleine-König wrote:

> The driver core ignores the return value of this callback because there
> is only little it can do when a device disappears.
> 
> This is the final bit of a long lasting cleanup quest where several
> buses were converted to also return void from their remove callback.
> Additionally some resource leaks were fixed that were caused by drivers
> returning an error code in the expectation that the driver won't go
> away.
> 
> With struct bus_type::remove returning void it's prevented that newly
> implemented buses return an ignored error code and so don't anticipate
> wrong expectations for driver authors.
> 

...

> diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c
> index ad3d17c42e23..d9d04f27f89b 100644
> --- a/drivers/nubus/bus.c
> +++ b/drivers/nubus/bus.c
> @@ -29,14 +29,12 @@ static int nubus_device_probe(struct device *dev)
>  	return err;
>  }
>  
> -static int nubus_device_remove(struct device *dev)
> +static void nubus_device_remove(struct device *dev)
>  {
>  	struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
> -	int err = -ENODEV;
>  
>  	if (dev->driver && ndrv->remove)
> -		err = ndrv->remove(to_nubus_board(dev));
> -	return err;
> +		ndrv->remove(to_nubus_board(dev));
>  }
>  
>  struct bus_type nubus_bus_type = {

Acked-by: Finn Thain <fthain@...ux-m68k.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ