Wei Yongjun
297a6961ff
net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe()
...
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(e1, res->start, e2);
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2018-01-11 13:56:24 -05:00
..
2017-12-01 15:42:21 -05:00
2016-10-20 14:25:23 -04:00
2018-01-08 14:20:21 -05:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2016-01-07 14:31:27 -05:00
2017-12-01 15:42:21 -05:00
2017-03-22 12:43:00 -07:00
2016-11-30 10:22:27 -05:00
2017-12-15 15:41:13 -05:00
2017-12-01 15:42:21 -05:00
2017-11-24 01:23:49 +09:00
2017-12-01 15:42:21 -05:00
2017-11-02 11:10:55 +01:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2016-01-07 14:31:27 -05:00
2018-01-03 10:38:54 -05:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2017-11-08 10:24:14 +09:00
2017-12-01 15:42:21 -05:00
2017-11-04 09:26:51 +09:00
2018-01-02 15:00:50 -05:00
2018-01-10 15:35:05 -05:00
2018-01-03 11:08:10 -05:00
2017-12-27 11:06:50 -05:00
2017-02-09 17:10:23 -05:00
2018-01-11 13:56:24 -05:00
2015-05-14 13:40:55 -04:00
2017-03-29 10:32:32 -07:00
2017-11-02 11:10:55 +01:00
2016-03-16 19:55:37 -04:00
2016-03-14 15:27:22 -04:00
2017-08-22 14:22:18 -07:00
2016-07-16 21:32:58 -07:00
2017-08-06 20:55:28 -07:00
2017-08-06 20:55:28 -07:00
2016-01-07 14:31:26 -05:00
2017-09-05 14:42:52 -07:00
2017-09-05 14:42:52 -07:00
2017-09-05 14:42:52 -07:00
2017-09-05 14:42:52 -07:00
2016-03-14 15:27:22 -04:00
2018-01-08 14:30:28 -05:00
2016-03-14 15:27:22 -04:00
2017-12-18 15:09:42 -05:00
2017-05-16 11:41:08 -04:00
2017-12-18 13:24:56 -05:00
2017-12-29 15:42:26 -05:00
2017-12-01 15:42:21 -05:00
2017-02-08 13:29:04 -05:00
2017-12-01 15:42:21 -05:00
2018-01-08 14:20:21 -05:00
2017-11-08 10:24:14 +09:00
2018-01-02 15:00:49 -05:00
2018-01-08 14:20:21 -05:00
2017-12-16 22:11:55 -05:00
2018-01-09 10:37:00 -05:00
2017-12-01 15:42:21 -05:00
2017-12-03 09:38:17 -05:00
2017-12-01 15:42:21 -05:00
2018-01-09 10:37:00 -05:00
2018-01-02 21:45:32 -05:00
2017-08-06 20:55:29 -07:00
2017-12-13 11:22:54 -05:00
2017-03-07 13:33:24 -08:00
2017-12-01 15:42:21 -05:00
2016-06-27 10:40:57 -04:00
2017-11-02 11:10:55 +01:00
2016-01-07 14:31:27 -05:00
2017-12-01 15:42:21 -05:00
2017-12-01 15:42:21 -05:00
2017-09-18 16:33:18 -07:00