Re: [kdave-btrfs-devel:for-next-20220401 96/102] fs/btrfs/sysfs.c:830 btrfs_force_chunk_alloc_store() warn: passing zero to 'PTR_ERR'

From: David Sterba
Date: Mon Apr 04 2022 - 10:30:15 EST


On Mon, Apr 04, 2022 at 04:40:17PM +0300, Dan Carpenter wrote:
> tree: https://github.com/kdave/btrfs-devel.git for-next-20220401
> head: 0c593f04d2f520a720c5c618ba9fe0355d08bba8
> commit: 6e115adef2b6a9b9a7cc25414e1b8f4414e02044 [96/102] btrfs: add force_chunk_alloc sysfs entry to force allocation
> config: nios2-randconfig-m031-20220403 (https://download.01.org/0day-ci/archive/20220403/202204030841.qWK5rMDU-lkp@xxxxxxxxx/config)
> compiler: nios2-linux-gcc (GCC) 11.2.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> New smatch warnings:
> fs/btrfs/sysfs.c:830 btrfs_force_chunk_alloc_store() warn: passing zero to 'PTR_ERR'

Thanks for the report, I've found more problems in the patches so there
will be another update, also fixing this problem.