diff options
author | Oleksandr Andrushchenko <[email protected]> | 2020-08-13 09:21:10 +0300 |
---|---|---|
committer | Juergen Gross <[email protected]> | 2020-08-13 12:50:25 +0200 |
commit | 14dee058610446aa464254fc5c8e88c7535195e0 (patch) | |
tree | 1db9b994005e8591608674db771d5c34ffb8a0d0 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 5fa4e6f1c2d8c9a4e47e1931b42893172d388f2b (diff) |
drm/xen-front: Fix misused IS_ERR_OR_NULL checks
The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV
display frontend" from Apr 3, 2018, leads to the following static
checker warning:
drivers/gpu/drm/xen/xen_drm_front_gem.c:140 xen_drm_front_gem_create()
warn: passing zero to 'ERR_CAST'
drivers/gpu/drm/xen/xen_drm_front_gem.c
133 struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev,
134 size_t size)
135 {
136 struct xen_gem_object *xen_obj;
137
138 xen_obj = gem_create(dev, size);
139 if (IS_ERR_OR_NULL(xen_obj))
140 return ERR_CAST(xen_obj);
Fix this and the rest of misused places with IS_ERR_OR_NULL in the
driver.
Fixes: c575b7eeb89f: "drm/xen-front: Add support for Xen PV display frontend"
Signed-off-by: Oleksandr Andrushchenko <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Juergen Gross <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions