1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/xen
Oleksandr Andrushchenko a31ac0b23c drm: Replace NULL with error value in drm_prime_pages_to_sg
Dan Carpenter has reported that there is the following static checker
warning:
	drivers/gpu/drm/drm_prime.c:317 drm_gem_map_dma_buf()
	warn: 'sgt' can also be NULL

314	sgt = obj->dev->driver->gem_prime_get_sg_table(obj);
315
316	if (!IS_ERR(sgt)) {
317		if (!dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir,

Problematic functions are xen_drm_front_gem_get_sg_table and
drm_gem_cma_prime_get_sg_table. Fix those by replacing NULL with error value.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180719093713.3643-1-andr2000@gmail.com
2018-07-23 11:47:35 +03:00
..
Kconfig
Makefile
xen_drm_front.c drm-misc-next for 4.19: 2018-06-22 12:58:08 +10:00
xen_drm_front.h drm/xen-front: fix pointer casts 2018-05-25 08:28:41 +03:00
xen_drm_front_cfg.c
xen_drm_front_cfg.h
xen_drm_front_conn.c
xen_drm_front_conn.h
xen_drm_front_evtchnl.c
xen_drm_front_evtchnl.h
xen_drm_front_gem.c drm: Replace NULL with error value in drm_prime_pages_to_sg 2018-07-23 11:47:35 +03:00
xen_drm_front_gem.h
xen_drm_front_kms.c drm/xen-front: use simple display pipe prepare_fb helper 2018-04-24 14:02:53 +02:00
xen_drm_front_kms.h
xen_drm_front_shbuf.c drm/xen-front: fix pointer casts 2018-05-25 08:28:41 +03:00
xen_drm_front_shbuf.h