diff mbox series

[1/3] slimbus: qcom-ngd: use correct error in message of pdr_add_lookup() failure

Message ID 20220830121359.634344-1-krzysztof.kozlowski@linaro.org
State Superseded
Headers show
Series [1/3] slimbus: qcom-ngd: use correct error in message of pdr_add_lookup() failure | expand

Commit Message

Krzysztof Kozlowski Aug. 30, 2022, 12:13 p.m. UTC
Use cprrect error code, instead of previous 'ret' value, when printing
error from pdr_add_lookup() failure.

Cc: <stable@vger.kernel.org>
Fixes: e1ae85e1830e ("slimbus: qcom-ngd-ctrl: add Protection Domain Restart Support")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff Johnson Aug. 30, 2022, 5:33 p.m. UTC | #1
On 8/30/2022 5:13 AM, Krzysztof Kozlowski wrote:
> Use cprrect error code, instead of previous 'ret' value, when printing

s/cprrect/correct/

> error from pdr_add_lookup() failure.
> 
> Cc: <stable@vger.kernel.org>
> Fixes: e1ae85e1830e ("slimbus: qcom-ngd-ctrl: add Protection Domain Restart Support")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>   drivers/slimbus/qcom-ngd-ctrl.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 0aa8408464ad..6fe6abb86061 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1581,6 +1581,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>   
>   	pds = pdr_add_lookup(ctrl->pdr, "avs/audio", "msm/adsp/audio_pd");
>   	if (IS_ERR(pds) && PTR_ERR(pds) != -EALREADY) {
> +		ret = PTR_ERR(pds);
>   		dev_err(dev, "pdr add lookup failed: %d\n", ret);
>   		return PTR_ERR(pds);

return ret?

>   	}
Krzysztof Kozlowski Aug. 30, 2022, 5:48 p.m. UTC | #2
On 30/08/2022 20:33, Jeff Johnson wrote:
> On 8/30/2022 5:13 AM, Krzysztof Kozlowski wrote:
>> Use cprrect error code, instead of previous 'ret' value, when printing
> 
> s/cprrect/correct/
> 

Thanks. I'll fix it.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 0aa8408464ad..6fe6abb86061 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1581,6 +1581,7 @@  static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 
 	pds = pdr_add_lookup(ctrl->pdr, "avs/audio", "msm/adsp/audio_pd");
 	if (IS_ERR(pds) && PTR_ERR(pds) != -EALREADY) {
+		ret = PTR_ERR(pds);
 		dev_err(dev, "pdr add lookup failed: %d\n", ret);
 		return PTR_ERR(pds);
 	}