From 36a4948be5dcef0c875012a217c0b98186fb6cab Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 25 Apr 2012 18:19:21 +0200 Subject: [PATCH] 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 --- src/uterm_video_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uterm_video_drm.c b/src/uterm_video_drm.c index e867a62..7ae8201 100644 --- a/src/uterm_video_drm.c +++ b/src/uterm_video_drm.c @@ -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)