drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
authorJoe Moriarty <joe.moriarty@oracle.com>
Mon, 12 Feb 2018 19:51:42 +0000 (14:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 06:01:02 +0000 (08:01 +0200)
commitdb7a49488068101d0d87ee87adf94ae820f459d2
treeffd47a2c2585d1a2e1d69c5d3ac597623c13e3c8
parent24fe595d29bd9d07af75e18cd2f30fdf9f52fb77
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem

commit 22a07038c0eaf4d1315a493ce66dcd255accba19 upstream.

The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer derefernce problem.

- drivers/gpu/drm/drm_dp_mst_topology.c
The call to drm_dp_calculate_rad() in function drm_dp_port_setup_pdt()
could result in a NULL pointer being returned to port->mstb due to a
failure to allocate memory for port->mstb.

Signed-off-by: Joe Moriarty <joe.moriarty@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180212195144.98323-3-joe.moriarty@oracle.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_dp_mst_topology.c