Hi Mihail, I love your patch! Perhaps something to improve: [auto build test WARNING on 94a853eca720ac9e385e59f27e859b4a01123f58] url: https://github.com/0day-ci/linux/commits/Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349 base: 94a853eca720ac9e385e59f27e859b4a01123f58 :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: x86_64-randconfig-c007-20210822 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/b4f124803ed8bfe5936c756ed4c7aa9124a1468a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349 git checkout b4f124803ed8bfe5936c756ed4c7aa9124a1468a # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> clang-analyzer warnings: (new ones prefixed by >>) >> drivers/iio/industrialio-buffer.c:325:9: warning: Called function pointer is null (null dereference) [clang-analyzer-core.CallAndMessage] return buffer->access->remove_from(buffer, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:322:6: note: Assuming 'buffer' is non-null if (!buffer || !buffer->access || buffer->access->remove_from) ^~~~~~~ drivers/iio/industrialio-buffer.c:322:6: note: Left side of '||' is false drivers/iio/industrialio-buffer.c:322:17: note: Assuming field 'access' is non-null if (!buffer || !buffer->access || buffer->access->remove_from) ^~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:322:6: note: Left side of '||' is false if (!buffer || !buffer->access || buffer->access->remove_from) ^ drivers/iio/industrialio-buffer.c:322:36: note: Assuming field 'remove_from' is null if (!buffer || !buffer->access || buffer->access->remove_from) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:322:6: note: Assuming pointer value is null if (!buffer || !buffer->access || buffer->access->remove_from) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/industrialio-buffer.c:322:2: note: Taking false branch if (!buffer || !buffer->access || buffer->access->remove_from) ^ drivers/iio/industrialio-buffer.c:325:9: note: Called function pointer is null (null dereference) return buffer->access->remove_from(buffer, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +325 drivers/iio/industrialio-buffer.c d2f0a48f36aea3 Lars-Peter Clausen 2013-10-04 319 b4f124803ed8bf Lars-Peter Clausen 2021-08-20 320 int iio_buffer_remove_sample(struct iio_buffer *buffer, u8 *data) b4f124803ed8bf Lars-Peter Clausen 2021-08-20 321 { b4f124803ed8bf Lars-Peter Clausen 2021-08-20 322 if (!buffer || !buffer->access || buffer->access->remove_from) b4f124803ed8bf Lars-Peter Clausen 2021-08-20 323 return -EINVAL; b4f124803ed8bf Lars-Peter Clausen 2021-08-20 324 b4f124803ed8bf Lars-Peter Clausen 2021-08-20 @325 return buffer->access->remove_from(buffer, data); b4f124803ed8bf Lars-Peter Clausen 2021-08-20 326 } b4f124803ed8bf Lars-Peter Clausen 2021-08-20 327 EXPORT_SYMBOL_GPL(iio_buffer_remove_sample); b4f124803ed8bf Lars-Peter Clausen 2021-08-20 328 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip