compositor-drm: pass NULL to mmap() instead of 0 as the address
mmap() function expects to be passed a void pointer as the address here. Passing NULL is technically more correct than passing 0. Signed-off-by: Chris Michael <cp.michael@samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
committed by
Derek Foreman
parent
6d556374b8
commit
4a7ce1f66d
@@ -308,7 +308,7 @@ drm_fb_create_dumb(struct drm_backend *b, unsigned width, unsigned height)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_add_fb;
|
goto err_add_fb;
|
||||||
|
|
||||||
fb->map = mmap(0, fb->size, PROT_WRITE,
|
fb->map = mmap(NULL, fb->size, PROT_WRITE,
|
||||||
MAP_SHARED, b->drm.fd, map_arg.offset);
|
MAP_SHARED, b->drm.fd, map_arg.offset);
|
||||||
if (fb->map == MAP_FAILED)
|
if (fb->map == MAP_FAILED)
|
||||||
goto err_add_fb;
|
goto err_add_fb;
|
||||||
|
|||||||
Reference in New Issue
Block a user