From: Olliver Schinagl Date: Mon, 26 Oct 2015 21:32:36 +0000 (+0100) Subject: pwm: sysfs: Remove unnecessary temporary variable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0344d0d69b3360ec551581c141c6599a0dcb5f27;p=linux-beck.git pwm: sysfs: Remove unnecessary temporary variable Use the result of pwm_is_enabled() directly instead of storing it in a temporary variable. Signed-off-by: Olliver Schinagl Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index c472772f00a7..ba67845b9063 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c @@ -97,9 +97,8 @@ static ssize_t pwm_enable_show(struct device *child, char *buf) { const struct pwm_device *pwm = child_to_pwm_device(child); - int enabled = pwm_is_enabled(pwm); - return sprintf(buf, "%d\n", enabled); + return sprintf(buf, "%d\n", pwm_is_enabled(pwm)); } static ssize_t pwm_enable_store(struct device *child,