linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong
Date: Mon,  7 Jan 2019 20:53:49 +0100	[thread overview]
Message-ID: <20190107195352.3149-2-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20190107195352.3149-1-u.kleine-koenig@pengutronix.de>

.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 55a3a363d5be..1e90d2b78625 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -444,8 +444,6 @@ static int imx_pwm_remove(struct platform_device *pdev)
 	struct imx_chip *imx;
 
 	imx = platform_get_drvdata(pdev);
-	if (imx == NULL)
-		return -ENODEV;
 
 	imx_pwm_clk_disable_unprepare(&imx->chip);
 
-- 
2.20.1

  reply	other threads:[~2019-01-07 19:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 19:53 [PATCH 0/4] pwm: imx: some cleanup patches Uwe Kleine-König
2019-01-07 19:53 ` Uwe Kleine-König [this message]
2019-01-07 19:53 ` [PATCH 2/4] pwm: imx: set drvdata earlier simplifying the end of .probe Uwe Kleine-König
2019-01-07 19:53 ` [PATCH 3/4] pwm: imx: don't print an error on -EPROBE_DEFER Uwe Kleine-König
2019-01-07 19:53 ` [PATCH 4/4] pwm: imx: split into two drivers Uwe Kleine-König
2019-01-10 20:19   ` [PATCH 0/2] ARM: adapt defconfigs to pwm driver split Uwe Kleine-König
2019-01-10 20:19     ` [PATCH 1/2] ARM: imx_v6_v7_defconfig: continue compiling the pwm driver Uwe Kleine-König
2019-01-10 20:19     ` [PATCH 2/2] ARM: imx_v4_v5_defconfig: enable PWM driver Uwe Kleine-König
2019-03-22  1:57     ` [PATCH 0/2] ARM: adapt defconfigs to pwm driver split Shawn Guo
2019-01-10 10:07 ` [PATCH 0/4] pwm: imx: some cleanup patches Thierry Reding
  -- strict thread matches above, loose matches on Subject: below --
2018-11-19 19:58 [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong Uwe Kleine-König
2018-12-21 15:04 ` 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=20190107195352.3149-2-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --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).