[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR04MB65751ACC25699CD1DB6229CEFC949@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Sun, 7 Mar 2021 06:41:07 +0000
From: Avri Altman <Avri.Altman@....com>
To: Jia-Ju Bai <baijiaju1990@...il.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"tomas.winkler@...el.com" <tomas.winkler@...el.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs: fix error return code of
ufshcd_populate_vreg()
>
> When np is NULL or of_parse_phandle() returns NULL, no error return code
> of ufshcd_populate_vreg() is assigned.
> To fix this bug, ret is assigned with -EINVAL or -ENOENT as error return
> code.
This changes the flow of ufshcd_parse_regulator_info so you need to:
a) get a tested-by tag and indicate which platform & devices you used, and
b) explain further why ufshcd_parse_regulator_info doesn't no longer allow
some of the regulators not to be set via DT, which is the current state.
Thanks,
Avri
>
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
> ---
> drivers/scsi/ufs/ufshcd-pltfrm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
> index 1a69949a4ea1..9f11c416a919 100644
> --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> @@ -113,6 +113,7 @@ static int ufshcd_populate_vreg(struct device *dev,
> const char *name,
>
> if (!np) {
> dev_err(dev, "%s: non DT initialization\n", __func__);
> + ret = -EINVAL;
> goto out;
> }
>
> @@ -120,6 +121,7 @@ static int ufshcd_populate_vreg(struct device *dev,
> const char *name,
> if (!of_parse_phandle(np, prop_name, 0)) {
> dev_info(dev, "%s: Unable to find %s regulator, assuming enabled\n",
> __func__, prop_name);
> + ret = -ENOENT;
> goto out;
> }
>
> --
> 2.17.1
Powered by blists - more mailing lists