From: Tyrel Datwyler <tyreld@linux.ibm.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>
Cc: sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"David S . Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block
Date: Wed, 20 Jan 2021 09:16:56 -0800 [thread overview]
Message-ID: <ce62e2fb-d882-ab6b-1a81-2315ce9a2b64@linux.ibm.com> (raw)
In-Reply-To: <20210114175718.137483-2-u.kleine-koenig@pengutronix.de>
On 1/14/21 9:57 AM, Uwe Kleine-König wrote:
> If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL
> value, and if hvcs_probe() failed hvcs_remove() isn't called.
>
> So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and
> the check can just go away.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> ---
> drivers/tty/hvc/hvcs.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
> index 509d1042825a..3e0461285c34 100644
> --- a/drivers/tty/hvc/hvcs.c
> +++ b/drivers/tty/hvc/hvcs.c
> @@ -825,9 +825,6 @@ static int hvcs_remove(struct vio_dev *dev)
> unsigned long flags;
> struct tty_struct *tty;
>
> - if (!hvcsd)
> - return -ENODEV;
> -
> /* By this time the vty-server won't be getting any more interrupts */
>
> spin_lock_irqsave(&hvcsd->lock, flags);
>
next prev parent reply other threads:[~2021-01-20 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 17:57 [PATCH 0/3] tty: some cleanups in remove functions Uwe Kleine-König
2021-01-14 17:57 ` [PATCH 1/3] tty: hvcs: Drop unnecessary if block Uwe Kleine-König
2021-01-15 8:19 ` Jiri Slaby
2021-01-20 17:16 ` Tyrel Datwyler [this message]
2021-01-14 17:57 ` [PATCH 2/3] tty: vcc: " Uwe Kleine-König
2021-01-15 8:20 ` Jiri Slaby
2021-01-14 17:57 ` [PATCH 3/3] tty: vcc: Drop impossible to hit WARN_ON Uwe Kleine-König
2021-01-15 8:20 ` Jiri Slaby
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=ce62e2fb-d882-ab6b-1a81-2315ce9a2b64@linux.ibm.com \
--to=tyreld@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).