Re: [PATCH 10/13] serial: max310x: Make max310x_remove() return void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 11, 2021 at 03:27:51PM +0200, Uwe Kleine-König wrote:
> Up to now max310x_remove() returns zero unconditionally. Make it return
> void instead which makes it easier to see in the callers that there is
> no error to handle.
> 
> Also the return value of spi remove callbacks is ignored anyway.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/max310x.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
> index 3df0788ddeb0..6816eeb1ffef 100644
> --- a/drivers/tty/serial/max310x.c
> +++ b/drivers/tty/serial/max310x.c
> @@ -1426,7 +1426,7 @@ static int max310x_probe(struct device *dev, const struct max310x_devtype *devty
>  	return ret;
>  }
>  
> -static int max310x_remove(struct device *dev)
> +static void max310x_remove(struct device *dev)
>  {
>  	struct max310x_port *s = dev_get_drvdata(dev);
>  	int i;
> @@ -1441,8 +1441,6 @@ static int max310x_remove(struct device *dev)
>  	}
>  
>  	clk_disable_unprepare(s->clk);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id __maybe_unused max310x_dt_ids[] = {
> @@ -1491,7 +1489,8 @@ static int max310x_spi_probe(struct spi_device *spi)
>  
>  static int max310x_spi_remove(struct spi_device *spi)
>  {
> -	return max310x_remove(&spi->dev);
> +	max310x_remove(&spi->dev);
> +	return 0

Does this compile?




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux