From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>,
Lee Jones <lee.jones@linaro.org>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH v2 1/2] pwm: pxa: Drop if with an always false condition
Date: Wed, 5 May 2021 18:19:08 +0200 [thread overview]
Message-ID: <20210505161909.187452-1-u.kleine-koenig@pengutronix.de> (raw)
The .remove() function is only called after .probe() returned
successfully. In this case platform_set_drvdata() was called with a
non-NULL argument and so platfrom_get_drvdata() returns the same
non-NULL value.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
only change since implicit v1: s/pwx/pxa/ in the Subject. Patch 2 is
unmodified.
Best regards
Uwe
drivers/pwm/pwm-pxa.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index cfb683827d32..31752640dcf7 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -210,8 +210,6 @@ static int pwm_remove(struct platform_device *pdev)
struct pxa_pwm_chip *chip;
chip = platform_get_drvdata(pdev);
- if (chip == NULL)
- return -ENODEV;
return pwmchip_remove(&chip->chip);
}
base-commit: a6efb35019d00f483a0e5f188747723371d659fe
--
2.30.2
next reply other threads:[~2021-05-05 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 16:19 Uwe Kleine-König [this message]
2021-05-05 16:19 ` [PATCH v2 2/2] pwm: pxa: Always use the same variable name for driver data Uwe Kleine-König
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=20210505161909.187452-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).