Re: [PATCH v2] regulator: qcom_smd: Keep one rpm handle for all vregs

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

 



On Wed, Jan 03, 2024 at 09:18:37PM +0100, Konrad Dybcio wrote:

> -	rpm = dev_get_drvdata(pdev->dev.parent);
> -	if (!rpm) {
> +	smd_vreg_rpm = dev_get_drvdata(pdev->dev.parent);
> +	if (!smd_vreg_rpm) {
>  		dev_err(&pdev->dev, "Unable to retrieve handle to rpm\n");
>  		return -ENODEV;
>  	}

It'd be slightly more robust to have a check here that we do get the
same RPM back if the variable is already set, just on the off chance
that something changes in some future system and we do end up with a
second RPM somehow.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux