Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380393

[PATCH v2 1/2] asus-laptop: remove redundant initializers

From Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/2] asus-laptop: remove redundant initializers
Date 2016-04-16 02:10 +0200
Message-ID <rolYe-347-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Initializing rv to AE_OK is pointless because later function results are
assigned to them and only then the variable is used

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
---
 drivers/platform/x86/asus-laptop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index f2b5d0a..d86d42e 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -771,7 +771,7 @@ static int asus_read_brightness(struct backlight_device *bd)
 {
 	struct asus_laptop *asus = bl_get_data(bd);
 	unsigned long long value;
-	acpi_status rv = AE_OK;
+	acpi_status rv;
 
 	rv = acpi_evaluate_integer(asus->handle, METHOD_BRIGHTNESS_GET,
 				   NULL, &value);
@@ -865,7 +865,7 @@ static ssize_t infos_show(struct device *dev, struct device_attribute *attr,
 	int len = 0;
 	unsigned long long temp;
 	char buf[16];		/* enough for all info */
-	acpi_status rv = AE_OK;
+	acpi_status rv;
 
 	/*
 	 * We use the easy way, we don't care of off and count,
@@ -1265,7 +1265,7 @@ static DEVICE_ATTR_RO(ls_value);
 static int asus_gps_status(struct asus_laptop *asus)
 {
 	unsigned long long status;
-	acpi_status rv = AE_OK;
+	acpi_status rv;
 
 	rv = acpi_evaluate_integer(asus->handle, METHOD_GPS_STATUS,
 				   NULL, &status);
-- 
2.8.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] asus-laptop: remove redundant initializers Giedrius Statkevičius   <giedrius.statkevicius@gmail.com> - 2016-04-16 02:10 +0200
  [PATCH v2 2/2] asus-laptop: correct error handling in sysfs_acpi_set Giedrius Statkevičius   <giedrius.statkevicius@gmail.com> - 2016-04-16 02:10 +0200
    Re: [PATCH v2 2/2] asus-laptop: correct error handling in  sysfs_acpi_set Darren Hart <dvhart@infradead.org> - 2016-04-20 22:30 +0200
      Re: [PATCH v2 2/2] asus-laptop: correct error handling in  sysfs_acpi_set Giedrius Statkevičius   <giedrius.statkevicius@gmail.com> - 2016-04-21 08:40 +0200
    Re: [PATCH v2 2/2] asus-laptop: correct error handling in sysfs_acpi_set Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-21 22:40 +0200
      Re: [PATCH v2 2/2] asus-laptop: correct error handling in  sysfs_acpi_set Darren Hart <dvhart@infradead.org> - 2016-04-21 23:00 +0200
    Re: [PATCH v2 2/2] asus-laptop: correct error handling in  sysfs_acpi_set Darren Hart <dvhart@infradead.org> - 2016-04-25 19:50 +0200
  Re: [PATCH v2 1/2] asus-laptop: remove redundant initializers Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-22 01:10 +0200

csiph-web