CC: [email protected]
CC: [email protected]
TO: "Lars-Peter Clausen" <[email protected]>
CC: Jonathan Cameron <[email protected]>
CC: Alexandru Ardelean <[email protected]>
CC: Mihail Chindris <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   aa50faff4416c869b52dff68a937c84d29e12f4b
commit: 1546d6718dc92b27935931ee4e4c2e9893ef3066 iio: kfifo-buffer: Add output 
buffer support
date:   8 weeks ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 weeks ago
config: i386-randconfig-m021-20211207 
(https://download.01.org/0day-ci/archive/20211214/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/iio/buffer/kfifo_buf.c:185 iio_kfifo_write() error: uninitialized 
symbol 'copied'.

Old smatch warnings:
drivers/iio/buffer/kfifo_buf.c:117 iio_read_kfifo() error: uninitialized symbol 
'copied'.

vim +/copied +185 drivers/iio/buffer/kfifo_buf.c

1546d6718dc92b Lars-Peter Clausen 2021-10-07  169  
1546d6718dc92b Lars-Peter Clausen 2021-10-07  170  static int 
iio_kfifo_write(struct iio_buffer *r, size_t n,
1546d6718dc92b Lars-Peter Clausen 2021-10-07  171       const char __user *buf)
1546d6718dc92b Lars-Peter Clausen 2021-10-07  172  {
1546d6718dc92b Lars-Peter Clausen 2021-10-07  173       struct iio_kfifo *kf = 
iio_to_kfifo(r);
1546d6718dc92b Lars-Peter Clausen 2021-10-07  174       int ret, copied;
1546d6718dc92b Lars-Peter Clausen 2021-10-07  175  
1546d6718dc92b Lars-Peter Clausen 2021-10-07  176       
mutex_lock(&kf->user_lock);
1546d6718dc92b Lars-Peter Clausen 2021-10-07  177       if 
(!kfifo_initialized(&kf->kf) || n < kfifo_esize(&kf->kf))
1546d6718dc92b Lars-Peter Clausen 2021-10-07  178               ret = -EINVAL;
1546d6718dc92b Lars-Peter Clausen 2021-10-07  179       else
1546d6718dc92b Lars-Peter Clausen 2021-10-07  180               ret = 
kfifo_from_user(&kf->kf, buf, n, &copied);
1546d6718dc92b Lars-Peter Clausen 2021-10-07  181       
mutex_unlock(&kf->user_lock);
1546d6718dc92b Lars-Peter Clausen 2021-10-07  182       if (ret)
1546d6718dc92b Lars-Peter Clausen 2021-10-07  183               return ret;
1546d6718dc92b Lars-Peter Clausen 2021-10-07  184  
1546d6718dc92b Lars-Peter Clausen 2021-10-07 @185       return copied;
1546d6718dc92b Lars-Peter Clausen 2021-10-07  186  }
1546d6718dc92b Lars-Peter Clausen 2021-10-07  187  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to