uterm_video_drm: return -EINVAL if already activated

If a display is already activated we return EINVAL. Otherwise, the user
might think that the requested mode was activated even though a totally
different mode may be still active.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-04-25 18:19:21 +02:00
parent 7e9a31aa4e
commit 36a4948be5

View File

@ -161,7 +161,7 @@ static int display_activate(struct uterm_display *disp, struct uterm_mode *mode)
if (!video || !video_is_awake(video) || !mode)
return -EINVAL;
if (display_is_online(disp))
return 0;
return -EINVAL;
ret = video_do_use(disp->video);
if (ret)