Re: [PATCH v1 1/3] cpufreq: mediatek: fix passing zero to 'PTR_ERR'

From: AngeloGioacchino Del Regno
Date: Fri Mar 10 2023 - 04:33:43 EST


Il 10/03/23 06:17, jia-wei.chang ha scritto:
From: "Jia-Wei Chang" <jia-wei.chang@xxxxxxxxxxxx>

In order to prevent passing zero to 'PTR_ERR' in
mtk_cpu_dvfs_info_init(), we fix the return value of of_get_cci() using
error pointer by explicitly casting error number.

Signed-off-by: Jia-Wei Chang <jia-wei.chang@xxxxxxxxxxxx>
Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
Reported-by: Dan Carpenter <error27@xxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>