From 3f4e6272007483d720a7c6677e81f80810513581 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 18 Oct 2016 15:11:32 -0700 Subject: drivers/i2c/generic: Return correct name for acpi_name Return config->name if it is not NULL. BUG=chrome-os-partner:55988 Change-Id: I9ae229949b73de6f991383daae8d962d6cf457a7 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/17077 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Paul Menzel --- src/drivers/i2c/generic/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/i2c/generic') diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 30a280bcff..c11a889d5b 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -86,7 +86,7 @@ static const char *i2c_generic_acpi_name(struct device *dev) static char name[5]; if (config->name) - return name; + return config->name; snprintf(name, sizeof(name), "D%03.3X", dev->path.i2c.device); name[4] = '\0'; -- cgit v1.2.3