Re: [Intel-gfx] [PATCH v5 08/40] drm/i915: Initialize HDCP2.2 and its MEI interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ 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  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux