linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: acpi: remove unneeded variable initialization
@ 2014-11-18 14:12 Wolfram Sang
       [not found] ` <1416319963-28946-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2014-11-18 14:12 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Mika Westerberg, Wolfram Sang

No need to initialize 'ret' if it gets assigned directly after that.

Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---
 drivers/i2c/i2c-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: acpi: remove unneeded variable initialization
       [not found] ` <1416319963-28946-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2014-11-18 14:27   ` Mika Westerberg
  2014-11-18 15:05   ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2014-11-18 14:27 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

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-z923LK4zBo2bacvFa/9K2g@public.gmane.org>

Acked-by: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: acpi: remove unneeded variable initialization
       [not found] ` <1416319963-28946-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  2014-11-18 14:27   ` Mika Westerberg
@ 2014-11-18 15:05   ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2014-11-18 15:05 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Mika Westerberg

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

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-z923LK4zBo2bacvFa/9K2g@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-18 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 14:12 [PATCH] i2c: acpi: remove unneeded variable initialization Wolfram Sang
     [not found] ` <1416319963-28946-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-18 14:27   ` Mika Westerberg
2014-11-18 15:05   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).