All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: meson: remove redundant assignment to variable fin_freq
@ 2020-04-02 11:08 ` Colin King
  0 siblings, 0 replies; 13+ messages in thread
From: Colin King @ 2020-04-02 11:08 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Kevin Hilman, linux-pwm,
	linux-arm-kernel, linux-amlogic
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable fin_freq 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/pwm-meson.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 8cf9129caa39..bd0d7336b898 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -163,7 +163,7 @@ static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
 {
 	struct meson_pwm_channel *channel = pwm_get_chip_data(pwm);
 	unsigned int duty, period, pre_div, cnt, duty_cnt;
-	unsigned long fin_freq = -1;
+	unsigned long fin_freq;
 
 	duty = state->duty_cycle;
 	period = state->period;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-04-16 16:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 11:08 [PATCH] pwm: meson: remove redundant assignment to variable fin_freq Colin King
2020-04-02 11:08 ` Colin King
2020-04-02 11:08 ` Colin King
2020-04-02 11:08 ` Colin King
2020-04-02 14:15 ` Uwe Kleine-König
2020-04-02 14:15   ` Uwe Kleine-König
2020-04-02 14:15   ` Uwe Kleine-König
2020-04-02 14:15   ` Uwe Kleine-König
2020-04-03 19:43 ` Thierry Reding
2020-04-03 19:43   ` Thierry Reding
2020-04-03 19:43   ` Thierry Reding
2020-04-03 19:43   ` Thierry Reding
2020-04-16 16:08 ` patchwork-bot+linux-amlogic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.