lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <568DC456.9060300@codeaurora.org>
Date:	Wed, 6 Jan 2016 17:50:14 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	"Ivan T. Ivanov" <ivan.ivanov@...aro.org>,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers

On 11/17/15 16:06, Stephen Boyd wrote:
> From: "Ivan T. Ivanov" <ivan.ivanov@...aro.org>
>
> Revision ID registers are available only on devices with
> Slave IDs that are even, so don't make access to unavailable
> registers.
>
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@...aro.org>
> [sboyd@...eaurora.org: Consider all slave ids that are even]
> Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
> ---

Ping?

>  drivers/mfd/qcom-spmi-pmic.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> index af6ac1c4b45c..8653e8b9bb4f 100644
> --- a/drivers/mfd/qcom-spmi-pmic.c
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -127,7 +127,9 @@ static int pmic_spmi_probe(struct spmi_device *sdev)
>  	if (IS_ERR(regmap))
>  		return PTR_ERR(regmap);
>  
> -	pmic_spmi_show_revid(regmap, &sdev->dev);
> +	/* Only the first slave id for a PMIC contains this information */
> +	if (sdev->usid % 2 == 0)
> +		pmic_spmi_show_revid(regmap, &sdev->dev);
>  
>  	return of_platform_populate(root, NULL, NULL, &sdev->dev);
>  }

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ