diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-11-10 13:28:08 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-12-04 19:59:57 -0500 |
commit | f0e6d9f164c2269df69b6d2fe05c285392a6a0d4 (patch) | |
tree | e281defecf838c0638fa29b29f58e3d6e6e7db98 | |
parent | 325c4b3b81027068914854adcba4e97200c809df (diff) |
PM / sysfs: Remove redundant 'else' keyword.
There is no need to use 'else' if in main branch 'return' is present.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/power/sysfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index 662632ac5e0e..1bf5e163ef1f 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c | |||
@@ -216,7 +216,7 @@ static ssize_t pm_qos_resume_latency_show(struct device *dev, | |||
216 | 216 | ||
217 | if (value == 0) | 217 | if (value == 0) |
218 | return sprintf(buf, "n/a\n"); | 218 | return sprintf(buf, "n/a\n"); |
219 | else if (value == PM_QOS_RESUME_LATENCY_NO_CONSTRAINT) | 219 | if (value == PM_QOS_RESUME_LATENCY_NO_CONSTRAINT) |
220 | value = 0; | 220 | value = 0; |
221 | 221 | ||
222 | return sprintf(buf, "%d\n", value); | 222 | return sprintf(buf, "%d\n", value); |
@@ -261,7 +261,7 @@ static ssize_t pm_qos_latency_tolerance_show(struct device *dev, | |||
261 | 261 | ||
262 | if (value < 0) | 262 | if (value < 0) |
263 | return sprintf(buf, "auto\n"); | 263 | return sprintf(buf, "auto\n"); |
264 | else if (value == PM_QOS_LATENCY_ANY) | 264 | if (value == PM_QOS_LATENCY_ANY) |
265 | return sprintf(buf, "any\n"); | 265 | return sprintf(buf, "any\n"); |
266 | 266 | ||
267 | return sprintf(buf, "%d\n", value); | 267 | return sprintf(buf, "%d\n", value); |
@@ -527,11 +527,11 @@ static ssize_t rtpm_children_show(struct device *dev, | |||
527 | static ssize_t rtpm_enabled_show(struct device *dev, | 527 | static ssize_t rtpm_enabled_show(struct device *dev, |
528 | struct device_attribute *attr, char *buf) | 528 | struct device_attribute *attr, char *buf) |
529 | { | 529 | { |
530 | if ((dev->power.disable_depth) && (dev->power.runtime_auto == false)) | 530 | if (dev->power.disable_depth && (dev->power.runtime_auto == false)) |
531 | return sprintf(buf, "disabled & forbidden\n"); | 531 | return sprintf(buf, "disabled & forbidden\n"); |
532 | else if (dev->power.disable_depth) | 532 | if (dev->power.disable_depth) |
533 | return sprintf(buf, "disabled\n"); | 533 | return sprintf(buf, "disabled\n"); |
534 | else if (dev->power.runtime_auto == false) | 534 | if (dev->power.runtime_auto == false) |
535 | return sprintf(buf, "forbidden\n"); | 535 | return sprintf(buf, "forbidden\n"); |
536 | return sprintf(buf, "enabled\n"); | 536 | return sprintf(buf, "enabled\n"); |
537 | } | 537 | } |