Skip to content
Snippets Groups Projects
Commit 70b39d6d authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

compositor-fbdev: MAP_FAILED is not NULL


Fix the assumption that MAP_FAILED would be equal to NULL. It is not.
Set 'fb' explicitly to NULL on mmap failure so that comparisons to NULL
would produce the expected result.

Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent 7d1e4b83
No related branches found
No related tags found
No related merge requests found
...@@ -381,6 +381,7 @@ fbdev_frame_buffer_map(struct fbdev_output *output, int fd) ...@@ -381,6 +381,7 @@ fbdev_frame_buffer_map(struct fbdev_output *output, int fd)
if (output->fb == MAP_FAILED) { if (output->fb == MAP_FAILED) {
weston_log("Failed to mmap frame buffer: %s\n", weston_log("Failed to mmap frame buffer: %s\n",
strerror(errno)); strerror(errno));
output->fb = NULL;
goto out_close; goto out_close;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment