[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170316141959.16018-1-andriy.shevchenko@linux.intel.com>
Date: Thu, 16 Mar 2017 16:19:59 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1] mfd: core: Preserve PLATFORM_DEVID_NONE
There is a potential flaw if cell has id > 0 and is going to be
registered with PLATFORM_DEVID_NONE.
Ignore if PLATFORM_DEVID_NONE is supplied.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/mfd/mfd-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index c57e407020f1..c9583f895058 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -149,7 +149,7 @@ static int mfd_add_device(struct device *parent, int id,
int platform_id;
int r;
- if (id == PLATFORM_DEVID_AUTO)
+ if (id < 0)
platform_id = id;
else
platform_id = id + cell->id;
--
2.11.0
Powered by blists - more mailing lists