pwm: Remove redundant assignment to pointer pwm
authorColin Ian King <colin.king@canonical.com>
Tue, 6 Jul 2021 15:11:32 +0000 (16:11 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 7 Jul 2021 19:43:32 +0000 (21:43 +0200)
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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c

index a28c863..35e894f 100644 (file)
@@ -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;