[PATCH -next] drm/meson: Fix potential NULL dereference in meson_drv_bind_master()

2018-03-22 Thread Wei Yongjun
platform_get_resource_byname() 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_byname(pdev, t

Re: [PATCH -next] drm/meson: Fix potential NULL dereference in meson_drv_bind_master()

2018-03-20 Thread Neil Armstrong
On 20/03/2018 16:04, Neil Armstrong wrote: > On 20/03/2018 15:20, Wei Yongjun wrote: >> platform_get_resource_byname() 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 semant

Re: [PATCH -next] drm/meson: Fix potential NULL dereference in meson_drv_bind_master()

2018-03-20 Thread Neil Armstrong
On 20/03/2018 15:20, Wei Yongjun wrote: > platform_get_resource_byname() 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