All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: <linux-wireless@vger.kernel.org>, Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH] ssb: remove unreachable code
Date: Thu, 20 May 2021 18:51:36 +0200	[thread overview]
Message-ID: <20210520185136.2cc3b32b@wiggum> (raw)
In-Reply-To: <1621306352-3632-1-git-send-email-tiantao6@hisilicon.com>

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

On Tue, 18 May 2021 10:52:32 +0800
Tian Tao <tiantao6@hisilicon.com> 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@bues.ch>

-- 
Michael

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-05-20 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  2:52 [PATCH] ssb: remove unreachable code Tian Tao
2021-05-20 16:51 ` Michael Büsch [this message]
2021-05-21  0:49   ` tiantao (H)
2021-05-21  3:36     ` Kalle Valo
2021-06-15 10:11 ` Kalle Valo
2022-05-06  7:58 [PATCH] " Jiapeng Chong
2022-05-06 15:29 ` Michael Büsch
2022-05-11  5:29 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210520185136.2cc3b32b@wiggum \
    --to=m@bues.ch \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tiantao6@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.