From patchwork Wed Jun 26 15:58:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 18136 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC57525E0D for ; Wed, 26 Jun 2013 15:59:22 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id e11sf11902455wgh.0 for ; Wed, 26 Jun 2013 08:59:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=tZqhvh/WvGAX/B92+D4Bp3Q2KE70tHz0GghQcOaycN8=; b=lKW4P/se4XhIO807LpYgMtA+VbEcoxqbKvMPpnmEvuyNSZP6hzHacT2c+nHFRNqrQ4 XHbuJiUcaTe/jogaUJgVjvz8sL+ysI6OBpRmGkMwq2MF66j+hGiEsaYTrXRmwgXjR9S6 n6NbV3v81yHcZ2uKXCE7NYM99vyXy5xYI8POrrDz0IQLi2eqngTxNxgKLZgXM2kXqBmH 8hcJKNkucCVlKSLPXR5HG1G+uWLAir4ufo2HhOSck6UgsVnwOxAYJjcnDoq26xe32oKC Yc8wJ0y7p2i21EcecZUbhAdhQbic6ha+fhPSG57cV4F4NllN5xjfoEcIzEeq4kso9PXT s51Q== X-Received: by 10.180.36.211 with SMTP id s19mr6278398wij.1.1372262361309; Wed, 26 Jun 2013 08:59:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.38.71 with SMTP id e7ls302799wik.11.gmail; Wed, 26 Jun 2013 08:59:20 -0700 (PDT) X-Received: by 10.180.83.200 with SMTP id s8mr3066090wiy.48.1372262360193; Wed, 26 Jun 2013 08:59:20 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id wx7si10096123wjb.108.2013.06.26.08.59.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 08:59:20 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id oz10so11616500veb.19 for ; Wed, 26 Jun 2013 08:59:19 -0700 (PDT) X-Received: by 10.52.27.172 with SMTP id u12mr1588266vdg.64.1372262359102; Wed, 26 Jun 2013 08:59:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp114593veb; Wed, 26 Jun 2013 08:59:18 -0700 (PDT) X-Received: by 10.14.251.73 with SMTP id a49mr4865183ees.45.1372262357955; Wed, 26 Jun 2013 08:59:17 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com [207.126.144.149]) by mx.google.com with SMTP id 1si19465994eei.189.2013.06.26.08.59.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Jun 2013 08:59:17 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of benjamin.gaignard@st.com) client-ip=207.126.144.149; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKUcsP0z1ScWDEtMHmSdWGPBaZ1B671ObA@postini.com; Wed, 26 Jun 2013 15:59:17 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2115AB2; Wed, 26 Jun 2013 15:59:15 +0000 (GMT) Received: from mail7.sgp.st.com (unknown [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E289557D8; Wed, 26 Jun 2013 15:58:50 +0000 (GMT) Received: from amgrou.rou.st.com (amgrou.rou.st.com [164.129.206.176]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id BGO63816; Wed, 26 Jun 2013 17:59:14 +0200 Received: from lme3sd00.lme.st.com (lme3sd00.lme.st.com [10.201.18.26]) by amgrou.rou.st.com (STMicroelectronics) with ESMTP id DFE5D127A46; Wed, 26 Jun 2013 15:45:33 +0000 (GMT) Received: from st.com (lmenx321.lme.st.com [10.201.23.15]) by lme3sd00.lme.st.com (8.13.8+Sun/8.13.8) with ESMTP id r5QFxDRX002788; Wed, 26 Jun 2013 17:59:13 +0200 (MEST) Received: (from frq08944@localhost) by st.com (8.14.4/8.13.6/Submit) id r5QFxDb0002522; Wed, 26 Jun 2013 17:59:13 +0200 From: Benjamin GAIGNARD To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, Benjamin Gaignard Subject: [PATCH] drm: drm_stub: Fixing return value if driver master_set call failed Date: Wed, 26 Jun 2013 17:58:59 +0200 Message-Id: <1372262339-2469-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQk5iXZ1cLy6Cl+nsyoUmYIO/g4cijyvETBEOVRfzoiZdoEFZcwGCrE42yuPBZznelJ+N3jU X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Benjamin Gaignard When dev->driver->master_set() failed ioctl call return 0 but the caller is not the DRM-Master because file_priv->is_master = 0. Fix that by returning to ioctl caller the driver master_set error code. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/drm_stub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 16f3ec5..a2f8c92 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -203,7 +203,7 @@ EXPORT_SYMBOL(drm_master_put); int drm_setmaster_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { - int ret; + int ret = 0; if (file_priv->is_master) return 0; @@ -229,7 +229,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data, } mutex_unlock(&dev->struct_mutex); - return 0; + return ret; } int drm_dropmaster_ioctl(struct drm_device *dev, void *data,