diff options
author | Joe Moriarty <joe.moriarty@oracle.com> | 2018-02-20 14:11:57 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-03-06 08:14:16 +0100 |
commit | 3bd07ccd27622d598fd9d87f3032dd457ad62083 (patch) | |
tree | d4edb294658745723ff0be57eb3b4f39e57eb766 /drivers/gpu/drm/drm_drv.c | |
parent | 4ffb8deeed58b75dd1a23580845233b6ce0dca6c (diff) | |
download | linux-3bd07ccd27622d598fd9d87f3032dd457ad62083.tar.gz linux-3bd07ccd27622d598fd9d87f3032dd457ad62083.tar.bz2 linux-3bd07ccd27622d598fd9d87f3032dd457ad62083.zip |
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer dereference problem.
- drivers/gpu/drm/drm_drv.c
Any calls to drm_minor_get_slot() could result in the return of a NULL
pointer when an invalid DRM device type is encountered. The
return of NULL was removed with BUG() from drm_minor_get_slot().
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/20180220191157.100960-3-joe.moriarty@oracle.com
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 9acc1e157813..a1b9338736e3 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -99,7 +99,7 @@ static struct drm_minor **drm_minor_get_slot(struct drm_device *dev, case DRM_MINOR_CONTROL: return &dev->control; default: - return NULL; + BUG(); } } |