[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180917211712.551670260@linuxfoundation.org>
Date: Tue, 18 Sep 2018 00:41:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Olof Johansson <olof@...om.net>
Subject: [PATCH 4.18 033/158] memory: ti-aemif: fix a potential NULL-pointer dereference
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
commit 6b45a2b1c0bc2aec84d1c56a1976ca9c8a621ecb upstream.
Platform data pointer may be NULL. We check it everywhere but in one
place. Fix it.
Fixes: 8af70cd2ca50 ("memory: aemif: add support for board files")
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc: stable@...r.kernel.org
Signed-off-by: Olof Johansson <olof@...om.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/memory/ti-aemif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_d
if (ret < 0)
goto error;
}
- } else {
+ } else if (pdata) {
for (i = 0; i < pdata->num_sub_devices; i++) {
pdata->sub_devices[i].dev.parent = dev;
ret = platform_device_register(&pdata->sub_devices[i]);
Powered by blists - more mailing lists