Re: [PATCH v2 3/7] staging: most: usb: check number of reported endpoints

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

 



Hi Christian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on usb/usb-testing linus/master v5.7-rc5 next-20200514]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Christian-Gromm/staging-most-usb-fix-issues-found-in-code-audit/20200514-232235
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 8a01032e02c8a0fb3e9f33791023b62dee73cc03
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a52f10b5a382c040e7ad1ce933cda6c07a4b3a8d)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/staging/most/usb/usb.c:1010:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!mdev->busy_urbs)
^~~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:1092:9: note: uninitialized use occurs here
return ret;
^~~
drivers/staging/most/usb/usb.c:1010:2: note: remove the 'if' if its condition is always false
if (!mdev->busy_urbs)
^~~~~~~~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:1005:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!mdev->ep_address)
^~~~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:1092:9: note: uninitialized use occurs here
return ret;
^~~
drivers/staging/most/usb/usb.c:1005:2: note: remove the 'if' if its condition is always false
if (!mdev->ep_address)
^~~~~~~~~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:999:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!mdev->cap)
^~~~~~~~~~
drivers/staging/most/usb/usb.c:1092:9: note: uninitialized use occurs here
return ret;
^~~
drivers/staging/most/usb/usb.c:999:2: note: remove the 'if' if its condition is always false
if (!mdev->cap)
^~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:995:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!mdev->conf)
^~~~~~~~~~~
drivers/staging/most/usb/usb.c:1092:9: note: uninitialized use occurs here
return ret;
^~~
drivers/staging/most/usb/usb.c:995:2: note: remove the 'if' if its condition is always false
if (!mdev->conf)
^~~~~~~~~~~~~~~~
drivers/staging/most/usb/usb.c:953:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
4 warnings generated.

vim +1010 drivers/staging/most/usb/usb.c

869d3acd488c28 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-28   923  
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   924  static void release_mdev(struct device *dev)
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   925  {
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   926  	struct most_dev *mdev = to_mdev_from_dev(dev);
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   927  
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   928  	kfree(mdev);
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   929  }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   930  /**
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   931   * hdm_probe - probe function of USB device driver
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   932   * @interface: Interface of the attached USB device
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   933   * @id: Pointer to the USB ID table.
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   934   *
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   935   * This allocates and initializes the device instance, adds the new
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   936   * entry to the internal list, scans the USB descriptors and registers
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   937   * the interface with the core.
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   938   * Additionally, the DCI objects are created and the hardware is sync'd.
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   939   *
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   940   * Return 0 on success. In case of an error a negative number is returned.
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   941   */
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   942  static int
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   943  hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   944  {
089612f183efb4 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19   945  	struct usb_host_interface *usb_iface_desc = interface->cur_altsetting;
089612f183efb4 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19   946  	struct usb_device *usb_dev = interface_to_usbdev(interface);
089612f183efb4 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19   947  	struct device *dev = &usb_dev->dev;
089612f183efb4 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19   948  	struct most_dev *mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   949  	unsigned int i;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   950  	unsigned int num_endpoints;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   951  	struct most_channel_capability *tmp_cap;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   952  	struct usb_endpoint_descriptor *ep_desc;
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   953  	int ret;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   954  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   955  	if (!mdev)
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   956  		return -ENOMEM;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   957  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   958  	usb_set_intfdata(interface, mdev);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   959  	num_endpoints = usb_iface_desc->desc.bNumEndpoints;
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   960  	if (num_endpoints > MAX_NUM_ENDPOINTS) {
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   961  		kfree(mdev);
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   962  		return -EINVAL;
7f704bf88cc1a9 drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-14   963  	}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   964  	mutex_init(&mdev->io_mutex);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   965  	INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
e99e88a9d2b067 drivers/staging/most/hdm-usb/hdm_usb.c Kees Cook       2017-10-16   966  	timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   967  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   968  	mdev->usb_device = usb_dev;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   969  	mdev->link_stat_timer.expires = jiffies + (2 * HZ);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   970  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   971  	mdev->iface.mod = hdm_usb_fops.owner;
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   972  	mdev->iface.dev = &mdev->dev;
69c90cf1b2faf5 drivers/staging/most/usb/usb.c         Christian Gromm 2018-05-08   973  	mdev->iface.driver_dev = &interface->dev;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   974  	mdev->iface.interface = ITYPE_USB;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   975  	mdev->iface.configure = hdm_configure_channel;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   976  	mdev->iface.request_netinfo = hdm_request_netinfo;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   977  	mdev->iface.enqueue = hdm_enqueue;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   978  	mdev->iface.poison_channel = hdm_poison_channel;
3598cec585f8d5 drivers/staging/most/usb/usb.c         Christian Gromm 2018-05-08   979  	mdev->iface.dma_alloc = hdm_dma_alloc;
3598cec585f8d5 drivers/staging/most/usb/usb.c         Christian Gromm 2018-05-08   980  	mdev->iface.dma_free = hdm_dma_free;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   981  	mdev->iface.description = mdev->description;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   982  	mdev->iface.num_channels = num_endpoints;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   983  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   984  	snprintf(mdev->description, sizeof(mdev->description),
5b082c2e07d851 drivers/staging/most/usb/usb.c         Christian Gromm 2019-04-03   985  		 "%d-%s:%d.%d",
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   986  		 usb_dev->bus->busnum,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   987  		 usb_dev->devpath,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   988  		 usb_dev->config->desc.bConfigurationValue,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   989  		 usb_iface_desc->desc.bInterfaceNumber);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   990  
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   991  	mdev->dev.init_name = mdev->description;
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   992  	mdev->dev.parent = &interface->dev;
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23   993  	mdev->dev.release = release_mdev;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   994  	mdev->conf = kcalloc(num_endpoints, sizeof(*mdev->conf), GFP_KERNEL);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   995  	if (!mdev->conf)
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21   996  		goto err_free_mdev;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   997  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   998  	mdev->cap = kcalloc(num_endpoints, sizeof(*mdev->cap), GFP_KERNEL);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24   999  	if (!mdev->cap)
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1000  		goto err_free_conf;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1001  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1002  	mdev->iface.channel_vector = mdev->cap;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1003  	mdev->ep_address =
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1004  		kcalloc(num_endpoints, sizeof(*mdev->ep_address), GFP_KERNEL);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1005  	if (!mdev->ep_address)
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1006  		goto err_free_cap;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1007  
27e6245e35bc6c drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19  1008  	mdev->busy_urbs =
27e6245e35bc6c drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19  1009  		kcalloc(num_endpoints, sizeof(*mdev->busy_urbs), GFP_KERNEL);
27e6245e35bc6c drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19 @1010  	if (!mdev->busy_urbs)
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1011  		goto err_free_ep_address;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1012  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1013  	tmp_cap = mdev->cap;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1014  	for (i = 0; i < num_endpoints; i++) {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1015  		ep_desc = &usb_iface_desc->endpoint[i].desc;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1016  		mdev->ep_address[i] = ep_desc->bEndpointAddress;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1017  		mdev->padding_active[i] = false;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1018  		mdev->is_channel_healthy[i] = true;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1019  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1020  		snprintf(&mdev->suffix[i][0], MAX_SUFFIX_LEN, "ep%02x",
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1021  			 mdev->ep_address[i]);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1022  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1023  		tmp_cap->name_suffix = &mdev->suffix[i][0];
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1024  		tmp_cap->buffer_size_packet = MAX_BUF_SIZE;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1025  		tmp_cap->buffer_size_streaming = MAX_BUF_SIZE;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1026  		tmp_cap->num_buffers_packet = BUF_CHAIN_SIZE;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1027  		tmp_cap->num_buffers_streaming = BUF_CHAIN_SIZE;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1028  		tmp_cap->data_type = MOST_CH_CONTROL | MOST_CH_ASYNC |
0540609fe217c3 drivers/staging/most/hdm-usb/hdm_usb.c Andrey Shvetsov 2016-09-21  1029  				     MOST_CH_ISOC | MOST_CH_SYNC;
afd14cef0156bc drivers/staging/most/hdm-usb/hdm_usb.c Sandhya Bankar  2016-03-06  1030  		if (usb_endpoint_dir_in(ep_desc))
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1031  			tmp_cap->direction = MOST_CH_RX;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1032  		else
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1033  			tmp_cap->direction = MOST_CH_TX;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1034  		tmp_cap++;
27e6245e35bc6c drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19  1035  		init_usb_anchor(&mdev->busy_urbs[i]);
88d1878bcaa438 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19  1036  		spin_lock_init(&mdev->channel_lock[i]);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1037  	}
59ed0480b95032 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-30  1038  	dev_notice(dev, "claimed gadget: Vendor=%4.4x ProdID=%4.4x Bus=%02x Device=%02x\n",
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1039  		   le16_to_cpu(usb_dev->descriptor.idVendor),
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1040  		   le16_to_cpu(usb_dev->descriptor.idProduct),
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1041  		   usb_dev->bus->busnum,
59ed0480b95032 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-30  1042  		   usb_dev->devnum);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1043  
59ed0480b95032 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-30  1044  	dev_notice(dev, "device path: /sys/bus/usb/devices/%d-%s:%d.%d\n",
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1045  		   usb_dev->bus->busnum,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1046  		   usb_dev->devpath,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1047  		   usb_dev->config->desc.bConfigurationValue,
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1048  		   usb_iface_desc->desc.bInterfaceNumber);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1049  
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1050  	ret = most_register_interface(&mdev->iface);
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1051  	if (ret)
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1052  		goto err_free_busy_urbs;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1053  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1054  	mutex_lock(&mdev->io_mutex);
654f7ec4b3b8ac drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19  1055  	if (le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81118 ||
5bf9bd8d19834f drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19  1056  	    le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81119 ||
5bf9bd8d19834f drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-08-19  1057  	    le16_to_cpu(usb_dev->descriptor.idProduct) == USB_DEV_ID_OS81210) {
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1058  		mdev->dci = kzalloc(sizeof(*mdev->dci), GFP_KERNEL);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1059  		if (!mdev->dci) {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1060  			mutex_unlock(&mdev->io_mutex);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1061  			most_deregister_interface(&mdev->iface);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1062  			ret = -ENOMEM;
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1063  			goto err_free_busy_urbs;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1064  		}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1065  
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1066  		mdev->dci->dev.init_name = "dci";
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23  1067  		mdev->dci->dev.parent = get_device(mdev->iface.dev);
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1068  		mdev->dci->dev.groups = dci_attr_groups;
869d3acd488c28 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-28  1069  		mdev->dci->dev.release = release_dci;
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1070  		if (device_register(&mdev->dci->dev)) {
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1071  			mutex_unlock(&mdev->io_mutex);
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1072  			most_deregister_interface(&mdev->iface);
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1073  			ret = -ENOMEM;
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1074  			goto err_free_dci;
4d5f022f3a664e drivers/staging/most/usb/usb.c         Christian Gromm 2017-11-21  1075  		}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1076  		mdev->dci->usb_device = mdev->usb_device;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1077  	}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1078  	mutex_unlock(&mdev->io_mutex);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1079  	return 0;
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1080  err_free_dci:
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23  1081  	put_device(&mdev->dci->dev);
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1082  err_free_busy_urbs:
27e6245e35bc6c drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2016-09-19  1083  	kfree(mdev->busy_urbs);
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1084  err_free_ep_address:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1085  	kfree(mdev->ep_address);
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1086  err_free_cap:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1087  	kfree(mdev->cap);
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1088  err_free_conf:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1089  	kfree(mdev->conf);
bddd3c2546e9c4 drivers/staging/most/usb/usb.c         Christian Gromm 2018-09-21  1090  err_free_mdev:
723de0f9171eeb drivers/staging/most/usb/usb.c         Christian Gromm 2020-01-23  1091  	put_device(&mdev->dev);
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1092  	return ret;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1093  }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  1094  

:::::: The code at line 1010 was first introduced by commit
:::::: 27e6245e35bc6c20c2933d7d8afa562623be1ef5 staging: most: hdm-usb: remove proprietary urb anchoring

:::::: TO: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux