From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [Intel-gfx] [PATCH v5 08/40] drm/i915: Initialize HDCP2.2 and its MEI interface Date: Thu, 28 Jun 2018 14:41:59 +0300 Message-ID: <20180628114159.hye3emcwbdibg6xl@mwanda> References: <1530088829-11730-9-git-send-email-ramalingam.c@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1530088829-11730-9-git-send-email-ramalingam.c@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kbuild-bounces@lists.01.org Sender: "kbuild" To: kbuild@01.org, Ramalingam C Cc: intel-gfx@lists.freedesktop.org, alexander.usyskin@intel.com, dri-devel@lists.freedesktop.org, uma.shankar@intel.com, kbuild-all@01.org, daniel@ffwll.ch, tomas.winkler@intel.com List-Id: dri-devel@lists.freedesktop.org [ The bot has a bug where it doesn't copy the error messages so I just guess what the issue is. - dan ] Hi Ramalingam, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ramalingam-C/drm-i915-Implement-HDCP2-2/20180627-174219 base: git://anongit.freedesktop.org/drm-intel for-linux-next # https://github.com/0day-ci/linux/commit/86525c76cf90e793d6d915879e144924d1520d60 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 86525c76cf90e793d6d915879e144924d1520d60 vim +941 drivers/gpu/drm/i915/intel_hdcp.c 86525c76 Ramalingam C 2018-06-27 913 86525c76 Ramalingam C 2018-06-27 914 static int i915_hdcp_component_master_bind(struct device *dev) 86525c76 Ramalingam C 2018-06-27 915 { 86525c76 Ramalingam C 2018-06-27 916 struct drm_i915_private *dev_priv = kdev_to_i915(dev); 86525c76 Ramalingam C 2018-06-27 917 struct i915_hdcp_component *comp = dev_priv->hdcp_comp; 86525c76 Ramalingam C 2018-06-27 918 int ret; 86525c76 Ramalingam C 2018-06-27 919 86525c76 Ramalingam C 2018-06-27 920 mutex_lock(&comp->mutex); 86525c76 Ramalingam C 2018-06-27 921 ret = component_bind_all(dev, comp); 86525c76 Ramalingam C 2018-06-27 922 if (ret < 0) 86525c76 Ramalingam C 2018-06-27 923 return ret; ^^^^^^^^^^ We should unlock before returning. goto unlock. We probably don't want to unbind if the bind failed? 86525c76 Ramalingam C 2018-06-27 924 86525c76 Ramalingam C 2018-06-27 925 /* 86525c76 Ramalingam C 2018-06-27 926 * Atm, we don't support dynamic unbinding initiated by the child 86525c76 Ramalingam C 2018-06-27 927 * component, so pin its containing module until we unbind. 86525c76 Ramalingam C 2018-06-27 928 */ 86525c76 Ramalingam C 2018-06-27 929 if (!try_module_get(comp->ops->owner)) { 86525c76 Ramalingam C 2018-06-27 930 ret = -ENODEV; 86525c76 Ramalingam C 2018-06-27 931 goto out_unbind; 86525c76 Ramalingam C 2018-06-27 932 } 86525c76 Ramalingam C 2018-06-27 933 86525c76 Ramalingam C 2018-06-27 934 mutex_unlock(&comp->mutex); 86525c76 Ramalingam C 2018-06-27 935 return 0; 86525c76 Ramalingam C 2018-06-27 936 86525c76 Ramalingam C 2018-06-27 937 out_unbind: 86525c76 Ramalingam C 2018-06-27 938 component_unbind_all(dev, comp); 86525c76 Ramalingam C 2018-06-27 939 mutex_unlock(&comp->mutex); 86525c76 Ramalingam C 2018-06-27 940 86525c76 Ramalingam C 2018-06-27 @941 return ret; 86525c76 Ramalingam C 2018-06-27 942 } 86525c76 Ramalingam C 2018-06-27 943