Hi Marcelo, kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Marcelo-Schmitt/iio-adc-ad4000-Add-support-for-SPI-offload/20250315-012316 base: af94f401e26f686f7391ce79b38a6129417c22dc patch link: https://lore.kernel.org/r/301fc83a961c4a2ef2ac980d0baa83d9d89a88c5.1741970538.git.marcelo.schmitt%40analog.com patch subject: [PATCH v1 1/4] iio: adc: ad4000: Add support for SPI offload config: parisc-randconfig-r072-20250316 (https://download.01.org/0day-ci/archive/20250316/202503161513.yeRBTxjg-lkp@xxxxxxxxx/config) compiler: hppa-linux-gcc (GCC) 14.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> | Closes: https://lore.kernel.org/r/202503161513.yeRBTxjg-lkp@xxxxxxxxx/ New smatch warnings: drivers/iio/adc/ad4000.c:862 ad4000_spi_offload_setup() warn: passing zero to 'PTR_ERR' vim +/PTR_ERR +862 drivers/iio/adc/ad4000.c e74205e82803041 Marcelo Schmitt 2025-03-14 846 static int ad4000_spi_offload_setup(struct iio_dev *indio_dev, e74205e82803041 Marcelo Schmitt 2025-03-14 847 struct ad4000_state *st) e74205e82803041 Marcelo Schmitt 2025-03-14 848 { e74205e82803041 Marcelo Schmitt 2025-03-14 849 struct spi_device *spi = st->spi; e74205e82803041 Marcelo Schmitt 2025-03-14 850 struct device *dev = &spi->dev; e74205e82803041 Marcelo Schmitt 2025-03-14 851 struct dma_chan *rx_dma; e74205e82803041 Marcelo Schmitt 2025-03-14 852 int ret; e74205e82803041 Marcelo Schmitt 2025-03-14 853 e74205e82803041 Marcelo Schmitt 2025-03-14 854 st->offload_trigger = devm_spi_offload_trigger_get(dev, st->offload, e74205e82803041 Marcelo Schmitt 2025-03-14 855 SPI_OFFLOAD_TRIGGER_PERIODIC); e74205e82803041 Marcelo Schmitt 2025-03-14 856 if (IS_ERR(st->offload_trigger)) e74205e82803041 Marcelo Schmitt 2025-03-14 857 return dev_err_probe(dev, PTR_ERR(st->offload_trigger), e74205e82803041 Marcelo Schmitt 2025-03-14 858 "Failed to get offload trigger\n"); e74205e82803041 Marcelo Schmitt 2025-03-14 859 e74205e82803041 Marcelo Schmitt 2025-03-14 860 ret = ad4000_set_sampling_freq(st, st->max_rate_hz); e74205e82803041 Marcelo Schmitt 2025-03-14 861 if (ret) e74205e82803041 Marcelo Schmitt 2025-03-14 @862 return dev_err_probe(dev, PTR_ERR(st->offload_trigger), s/PTR_ERR(st->offload_trigger)/ret/ e74205e82803041 Marcelo Schmitt 2025-03-14 863 "Failed to set sampling frequency\n"); e74205e82803041 Marcelo Schmitt 2025-03-14 864 e74205e82803041 Marcelo Schmitt 2025-03-14 865 rx_dma = devm_spi_offload_rx_stream_request_dma_chan(dev, st->offload); e74205e82803041 Marcelo Schmitt 2025-03-14 866 if (IS_ERR(rx_dma)) e74205e82803041 Marcelo Schmitt 2025-03-14 867 return dev_err_probe(dev, PTR_ERR(rx_dma), e74205e82803041 Marcelo Schmitt 2025-03-14 868 "Failed to get offload RX DMA\n"); e74205e82803041 Marcelo Schmitt 2025-03-14 869 e74205e82803041 Marcelo Schmitt 2025-03-14 870 ret = devm_iio_dmaengine_buffer_setup_with_handle(dev, indio_dev, rx_dma, e74205e82803041 Marcelo Schmitt 2025-03-14 871 IIO_BUFFER_DIRECTION_IN); e74205e82803041 Marcelo Schmitt 2025-03-14 872 if (ret) e74205e82803041 Marcelo Schmitt 2025-03-14 873 return dev_err_probe(dev, ret, "Failed to setup DMA buffer\n"); e74205e82803041 Marcelo Schmitt 2025-03-14 874 e74205e82803041 Marcelo Schmitt 2025-03-14 875 return 0; e74205e82803041 Marcelo Schmitt 2025-03-14 876 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki