[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210706151133.33175-1-colin.king@canonical.com>
Date: Tue, 6 Jul 2021 16:11:32 +0100
From: Colin King <colin.king@...onical.com>
To: Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Lee Jones <lee.jones@...aro.org>,
linux-pwm@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] pwm: core: remove redundant assignment to pointer pwm
From: Colin Ian King <colin.king@...onical.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@...onical.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;
--
2.31.1
Powered by blists - more mailing lists