From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Colin King <colin.king@canonical.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
linux-pwm@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH][next] pwm: core: remove redundant assignment to pointer pwm
Date: Tue, 6 Jul 2021 17:58:20 +0200 [thread overview]
Message-ID: <20210706155820.aiv3q6rxuer7kdco@pengutronix.de> (raw)
In-Reply-To: <20210706151133.33175-1-colin.king@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]
Hello,
[adding Andy and Rafael to Cc:]
On Tue, Jul 06, 2021 at 04:11:32PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer pwm is being initialized with a value that is never read and
> it is being updated later with a new value. The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/pwm/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> index a28c8639af5b..35e894f4a379 100644
> --- a/drivers/pwm/core.c
> +++ b/drivers/pwm/core.c
> @@ -846,7 +846,7 @@ EXPORT_SYMBOL_GPL(of_pwm_get);
> */
> static struct pwm_device *acpi_pwm_get(const struct fwnode_handle *fwnode)
> {
> - struct pwm_device *pwm = ERR_PTR(-ENODEV);
> + struct pwm_device *pwm;
> struct fwnode_reference_args args;
> struct pwm_chip *chip;
> int ret;
LGTM:
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
and if you want:
Fixes: e5c38ba9f281 ("pwm: core: Reuse fwnode_to_pwmchip() in ACPI case")
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-07-06 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 15:11 [PATCH][next] pwm: core: remove redundant assignment to pointer pwm Colin King
2021-07-06 15:58 ` Uwe Kleine-König [this message]
2021-07-06 16:27 ` Andy Shevchenko
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=20210706155820.aiv3q6rxuer7kdco@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--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).