Re: [PATCH] udmabuf: Set the DMA mask for the udmabuf device

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

 



Hi Vivek,

url:    https://github.com/intel-lab-lkp/linux/commits/Vivek-Kasireddy/udmabuf-Set-the-DMA-mask-for-the-udmabuf-device/20220520-144218
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205210319.OvuI0mKr-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

New smatch warnings:
drivers/dma-buf/udmabuf.c:383 udmabuf_dev_init() warn: '&udmabuf_misc' from misc_register() not released on lines: 380.

vim +383 drivers/dma-buf/udmabuf.c

fbb0de79507819 Gerd Hoffmann   2018-08-27  366  static int __init udmabuf_dev_init(void)
fbb0de79507819 Gerd Hoffmann   2018-08-27  367  {
0fdcc793991b9f Vivek Kasireddy 2022-05-19  368  	int ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19  369  
0fdcc793991b9f Vivek Kasireddy 2022-05-19  370  	ret = misc_register(&udmabuf_misc);
0fdcc793991b9f Vivek Kasireddy 2022-05-19  371  	if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19  372  		pr_err("Could not initialize udmabuf device\n");
0fdcc793991b9f Vivek Kasireddy 2022-05-19  373  		return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19  374  	}
0fdcc793991b9f Vivek Kasireddy 2022-05-19  375  
0fdcc793991b9f Vivek Kasireddy 2022-05-19  376  	ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
0fdcc793991b9f Vivek Kasireddy 2022-05-19  377  					   DMA_BIT_MASK(64));
0fdcc793991b9f Vivek Kasireddy 2022-05-19  378  	if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19  379  		pr_err("Could not setup DMA mask for udmabuf device\n");

misc_unregister()?

0fdcc793991b9f Vivek Kasireddy 2022-05-19  380  		return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19  381  	}
0fdcc793991b9f Vivek Kasireddy 2022-05-19  382  
0fdcc793991b9f Vivek Kasireddy 2022-05-19 @383  	return 0;
fbb0de79507819 Gerd Hoffmann   2018-08-27  384  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[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