On Tuesday, January 7, 2025 6:08 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > Hello Karan Tilak Kumar, > > Commit a63e78eb2b0f ("scsi: fnic: Add support for fabric based > solicited requests and responses") from Dec 11, 2024 (linux-next), > leads to the following Smatch static checker warning: > > drivers/scsi/fnic/fnic_main.c:907 fnic_probe() > warn: missing error code 'err' > > drivers/scsi/fnic/fnic_main.c > 866 > 867 err = fnic_alloc_vnic_resources(fnic); > 868 if (err) { > 869 dev_err(&fnic->pdev->dev, "Failed to alloc vNIC resources, " > 870 "aborting.\n"); > 871 goto err_out_fnic_alloc_vnic_res; > 872 } > 873 dev_info(&fnic->pdev->dev, "fnic copy wqs: %d, Q0 ioreq table size: %d\n", > 874 fnic->wq_copy_count, fnic->sw_copy_wq[0].ioreq_table_size); > 875 > 876 /* initialize all fnic locks */ > 877 spin_lock_init(&fnic->fnic_lock); > 878 > 879 for (i = 0; i < FNIC_WQ_MAX; i++) > 880 spin_lock_init(&fnic->wq_lock[i]); > 881 > 882 for (i = 0; i < FNIC_WQ_COPY_MAX; i++) { > 883 spin_lock_init(&fnic->wq_copy_lock[i]); > 884 fnic->wq_copy_desc_low[i] = DESC_CLEAN_LOW_WATERMARK; > 885 fnic->fw_ack_recd[i] = 0; > 886 fnic->fw_ack_index[i] = -1; > 887 } > 888 > 889 pool = mempool_create_slab_pool(2, fnic_sgl_cache[FNIC_SGL_CACHE_DFLT]); > 890 if (!pool) > 891 goto err_out_free_resources; > > err = -ENOMEM; > > 892 fnic->io_sgl_pool[FNIC_SGL_CACHE_DFLT] = pool; > 893 > 894 pool = mempool_create_slab_pool(2, fnic_sgl_cache[FNIC_SGL_CACHE_MAX]); > 895 if (!pool) > 896 goto err_out_free_dflt_pool; > > err = -ENOMEM; > > 897 fnic->io_sgl_pool[FNIC_SGL_CACHE_MAX] = pool; > 898 > 899 pool = mempool_create_slab_pool(FDLS_MIN_FRAMES, fdls_frame_cache); > 900 if (!pool) > 901 goto err_out_fdls_frame_pool; > > err = -ENOMEM; > > 902 fnic->frame_pool = pool; > 903 > 904 pool = mempool_create_slab_pool(FDLS_MIN_FRAME_ELEM, > 905 fdls_frame_elem_cache); > 906 if (!pool) > --> 907 goto err_out_fdls_frame_elem_pool; > > err = -ENOMEM; > > regards, > dan carpenter > +Cisco team Thanks for this bug report, Dan. We will fix this in a future update. Regards, Karan