From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
kernel@pengutronix.de
Subject: [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong
Date: Mon, 19 Nov 2018 20:58:05 +0100 [thread overview]
Message-ID: <20181119195808.16436-1-u.kleine-koenig@pengutronix.de> (raw)
.remove is only called when probe returned successfully. In this case the
driver data cannot be NULL.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-imx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 1d5242c9cde0..7296578571f0 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -312,8 +312,6 @@ static int imx_pwm_remove(struct platform_device *pdev)
struct imx_chip *imx;
imx = platform_get_drvdata(pdev);
- if (imx == NULL)
- return -ENODEV;
return pwmchip_remove(&imx->chip);
}
--
2.19.1
next reply other threads:[~2018-11-19 19:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 19:58 Uwe Kleine-König [this message]
2018-11-19 19:58 ` [PATCH 2/4] pwm: imx: set drvdata earlier simplifying the end of .probe Uwe Kleine-König
2018-11-19 19:58 ` [PATCH 3/4] pwm: imx: don't print an error on -EPROBE_DEFER Uwe Kleine-König
2018-11-19 19:58 ` [PATCH 4/4] pwm: imx: split into two drivers Uwe Kleine-König
2018-12-21 15:04 ` [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong Uwe Kleine-König
-- strict thread matches above, loose matches on Subject: below --
2019-01-07 19:53 [PATCH 0/4] pwm: imx: some cleanup patches Uwe Kleine-König
2019-01-07 19:53 ` [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong 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=20181119195808.16436-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--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 NNTP newsgroup(s).