diff mbox

i2c: acpi: remove unneeded variable initialization

Message ID 1416319963-28946-1-git-send-email-wsa@the-dreams.de
State Accepted
Headers show

Commit Message

Wolfram Sang Nov. 18, 2014, 2:12 p.m. UTC
No need to initialize 'ret' if it gets assigned directly after that.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/i2c-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Westerberg Nov. 18, 2014, 2:27 p.m. UTC | #1
On Tue, Nov 18, 2014 at 03:12:43PM +0100, Wolfram Sang wrote:
> No need to initialize 'ret' if it gets assigned directly after that.

True.

> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Nov. 18, 2014, 3:05 p.m. UTC | #2
On Tue, Nov 18, 2014 at 03:12:43PM +0100, Wolfram Sang wrote:
> No need to initialize 'ret' if it gets assigned directly after that.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index cf830915713b..3105bd273f70 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -260,7 +260,7 @@  acpi_i2c_space_handler(u32 function, acpi_physical_address command,
 	struct acpi_resource *ares;
 	u32 accessor_type = function >> 16;
 	u8 action = function & ACPI_IO_MASK;
-	acpi_status ret = AE_OK;
+	acpi_status ret;
 	int status;
 
 	ret = acpi_buffer_to_resource(info->connection, info->length, &ares);