Re: [PATCH V2 1/3] scsi: ufs: Allow vendor specific initialization

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

 



>
> +static int ufshcd_variant_hba_init(struct ufs_hba *hba)
> +{
> +       int err = 0;
> +
> +       if (!hba->vops)
> +               goto out;
> +
> +       if (hba->vops->init) {
> +               err = hba->vops->init(hba);
> +               if (err)
> +                       goto out;
> +       }
> +
> +       if (hba->vops->setup_clocks) {
> +               err = hba->vops->setup_clocks(hba, true);
> +               if (err)
> +                       goto out_exit;
> +       }
> +
> +       if (hba->vops->setup_regulators) {
> +               err = hba->vops->setup_regulators(hba, true);
> +               if (err)
> +                       goto out_clks;
> +       }
> +
> +       goto out;
> +
> +out_clks:
> +       if (hba->vops->setup_clocks)
> +               hba->vops->setup_clocks(hba, false);
> +out_exit:
> +       if (hba->vops->exit)
> +               hba->vops->exit(hba);
> +out:
> +       if (err)
> +               dev_err(hba->dev, "%s: variant %s init failed err %d\n",
> +                       __func__, hba->vops ? hba->vops->name : "", err);
                                              ^^^^^^^
a minor comment, 'hba->vops' will not be NULL here,

> +       return err;
> +}
> +


-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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