Wei Yongjun
c29e9da56b
pinctrl: nsp: Fix potential NULL dereference
...
platform_get_resource() may fail and return NULL, so we should
better check it's return value to avoid a NULL pointer dereference
a bit later in the code.
This is detected by Coccinelle semantic patch.
@@
expression pdev, res, n, t, e, e1, e2;
@@
res = platform_get_resource(pdev, t, n);
+ if (!res)
+ return -EINVAL;
... when != res == NULL
e = devm_ioremap_nocache(e1, res->start, e2);
Fixes: cc4fa83f66 ("pinctrl: nsp: add pinmux driver support for Broadcom NSP SoC")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com >
Reviewed-by: Ray Jui <ray.jui@broadcom.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2018-07-14 12:47:04 +02:00
..
2018-06-18 07:55:56 +02:00
2017-08-31 13:39:38 +02:00
2018-07-14 12:47:04 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-07 13:56:45 -07:00
2018-07-14 12:47:04 +02:00
2018-06-07 13:56:45 -07:00
2018-06-12 16:19:22 -07:00
2018-03-23 03:38:14 +01:00
2017-11-30 14:42:04 +01:00
2018-05-24 10:03:51 +02:00
2018-06-12 16:19:22 -07:00
2018-07-14 12:47:04 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-05-24 12:38:22 +01:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-07 13:56:45 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-03-02 11:05:35 +01:00
2017-09-22 11:02:10 +02:00
2018-06-18 07:55:56 +02:00
2017-01-03 09:26:16 +01:00
2018-05-02 14:36:08 +02:00
2018-05-02 14:36:08 +02:00
2017-11-08 13:49:45 +01:00
2017-08-14 15:01:59 +02:00
2017-08-14 15:01:02 +02:00
2018-03-26 11:09:49 +02:00
2017-09-12 15:58:45 +02:00
2018-03-01 17:04:09 +01:00
2016-04-21 09:23:21 +02:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2014-10-29 09:28:35 +01:00
2018-06-12 16:19:22 -07:00
2017-11-08 14:06:21 +01:00
2017-11-02 11:10:55 +01:00
2017-01-26 15:27:54 +01:00
2018-06-12 16:19:22 -07:00
2016-12-30 09:17:02 +01:00
2018-02-02 14:22:53 -08:00
2018-07-14 12:47:04 +02:00
2018-06-12 16:19:22 -07:00
2016-12-30 09:17:02 +01:00
2018-06-12 16:19:22 -07:00
2017-11-08 13:49:57 +01:00
2018-02-22 16:08:59 +01:00
2018-06-12 16:19:22 -07:00
2017-11-08 14:06:21 +01:00
2018-01-03 08:46:49 +01:00
2017-11-08 14:06:21 +01:00
2016-02-05 23:54:47 +01:00
2017-11-08 14:06:21 +01:00
2017-08-21 08:54:46 +01:00
2018-06-12 16:19:22 -07:00
2017-10-09 09:16:21 +02:00
2018-06-18 07:55:56 +02:00
2018-06-12 16:19:22 -07:00
2018-01-18 11:04:47 +01:00
2017-08-22 14:41:40 +02:00
2016-06-13 09:27:43 +02:00
2018-01-03 08:46:53 +01:00
2016-04-01 15:06:36 +02:00
2018-06-12 16:19:22 -07:00
2017-08-14 15:01:01 +02:00
2018-01-16 11:07:18 +01:00
2017-08-14 15:01:02 +02:00