Search Linux Wireless

Re: [PATCH] ssb: remove unreachable code

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

 



On Tue, 18 May 2021 10:52:32 +0800
Tian Tao <tiantao6@xxxxxxxxxxxxx> wrote:

> The return value of ssb_bus_unregister can only be 0 or 1, so this
> condition if (err == -EBUSY) will not hold, so delete it.

> @@ -431,9 +431,7 @@ void ssb_bus_unregister(struct ssb_bus *bus)
>  	int err;
>  
>  	err = ssb_gpio_unregister(bus);
> -	if (err == -EBUSY)
> -		pr_debug("Some GPIOs are still in use\n");
> -	else if (err)
> +	if (err)
>  		pr_debug("Can not unregister GPIO driver: %i\n", err);
>  
>  	ssb_buses_lock();

Good catch.
Minor correction: The return value can be 0 or -1.

Acked-by: Michael Büsch <m@xxxxxxx>

-- 
Michael

Attachment: pgpzEiiC2b_tQ.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux