Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0344d0d6 authored by Olliver Schinagl's avatar Olliver Schinagl Committed by Thierry Reding
Browse files

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: default avatarOlliver Schinagl <oliver@schinagl.nl>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent b68edac9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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,