RE: [bug report] scsi: fnic: Modify fnic interfaces to use FDLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, January 7, 2025 2:03 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> Hello Karan Tilak Kumar,
>
> Commit 9243626c211e ("scsi: fnic: Modify fnic interfaces to use
> FDLS") from Dec 11, 2024 (linux-next), leads to the following Smatch
> static checker warning:
>
> drivers/scsi/fnic/fnic_main.c:1034 fnic_probe()
> warn: missing error code here? 'fnic_scsi_drv_init()' failed. 'err' = '0'
>
> drivers/scsi/fnic/fnic_main.c
> 1020
> 1021         vnic_dev_enable(fnic->vdev);
> 1022
> 1023         err = fnic_request_intr(fnic);
> 1024         if (err) {
> 1025                 dev_err(&fnic->pdev->dev, "Unable to request irq.\n");
> 1026                 goto err_out_fnic_request_intr;
> 1027         }
> 1028
> 1029         fnic_notify_timer_start(fnic);
> 1030
> 1031         fnic_fdls_init(fnic, (fnic->config.flags & VFCF_FIP_CAPABLE));
> 1032
> 1033         if (IS_FNIC_FCP_INITIATOR(fnic) && fnic_scsi_drv_init(fnic))
> --> 1034                 goto err_out_scsi_drv_init;
>
> Missing error code.
>
> 1035
> 1036         err = fnic_stats_debugfs_init(fnic);
> 1037         if (err) {
> 1038                 dev_err(&fnic->pdev->dev, "Failed to initialize debugfs for stats\n");
> 1039                 goto err_out_free_stats_debugfs;
> 1040         }
> 1041
> 1042         for (i = 0; i < fnic->intr_count; i++)
> 1043                 vnic_intr_unmask(&fnic->intr[i]);
> 1044
> 1045         spin_lock_irqsave(&fnic_list_lock, flags);
> 1046         list_add_tail(&fnic->list, &fnic_list);
> 1047         spin_unlock_irqrestore(&fnic_list_lock, flags);
> 1048
> 1049         return 0;
> 1050
> 1051 err_out_free_stats_debugfs:
> 1052         fnic_stats_debugfs_remove(fnic);
> 1053         scsi_remove_host(fnic->host);
> 1054 err_out_scsi_drv_init:
> 1055         fnic_free_intr(fnic);
> 1056 err_out_fnic_request_intr:
> 1057 err_out_alloc_rq_buf:
> 1058         for (i = 0; i < fnic->rq_count; i++) {
> 1059                 if (ioread32(&fnic->rq[i].ctrl->enable))
> 1060                         vnic_rq_disable(&fnic->rq[i]);
> 1061                 vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf);
> 1062         }
> 1063         vnic_dev_notify_unset(fnic->vdev);
> 1064 err_out_fnic_notify_set:
> 1065         mempool_destroy(fnic->frame_elem_pool);
> 1066 err_out_fdls_frame_elem_pool:
> 1067         mempool_destroy(fnic->frame_pool);
> 1068 err_out_fdls_frame_pool:
> 1069         mempool_destroy(fnic->io_sgl_pool[FNIC_SGL_CACHE_MAX]);
> 1070 err_out_free_dflt_pool:
> 1071         mempool_destroy(fnic->io_sgl_pool[FNIC_SGL_CACHE_DFLT]);
> 1072 err_out_free_resources:
> 1073         fnic_free_vnic_resources(fnic);
> 1074 err_out_fnic_alloc_vnic_res:
> 1075         fnic_clear_intr_mode(fnic);
> 1076 err_out_fnic_set_intr_mode:
> 1077         if (IS_FNIC_FCP_INITIATOR(fnic))
> 1078                 scsi_host_put(fnic->host);
> 1079 err_out_fnic_role:
> 1080 err_out_scsi_host_alloc:
> 1081 err_out_fnic_get_config:
> 1082 err_out_dev_mac_addr:
> 1083 err_out_dev_init:
> 1084         vnic_dev_close(fnic->vdev);
> 1085 err_out_dev_open:
> 1086 err_out_dev_cmd_init:
> 1087         vnic_dev_unregister(fnic->vdev);
> 1088 err_out_dev_register:
> 1089         fnic_iounmap(fnic);
> 1090 err_out_fnic_map_bar:
> 1091 err_out_map_bar:
> 1092 err_out_set_dma_mask:
> 1093         pci_release_regions(pdev);
> 1094 err_out_pci_request_regions:
> 1095         pci_disable_device(pdev);
> 1096 err_out_pci_enable_device:
> 1097         ida_free(&fnic_ida, fnic->fnic_num);
> 1098 err_out_ida_alloc:
> 1099         kfree(fnic);
> 1100 err_out_fnic_alloc:
> 1101         return err;
> 1102 }
>
> regards,
> dan carpenter
>

Thanks for this bug report, Dan. Appreciate your help.
We will address this in a future update.

Regards,
Karan





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux