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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6314775-0918-eb9a-d501-2f22db6a951c@gmail.com>
Date:   Thu, 30 Mar 2023 11:30:14 +0200
From:   Matthias Brugger <matthias.bgg@...il.com>
To:     Roger Lu <roger.lu@...iatek.com>,
        Enric Balletbo Serra <eballetbo@...il.com>,
        Kevin Hilman <khilman@...nel.org>,
        Nicolas Boichat <drinkcat@...gle.com>
Cc:     Fan Chen <fan.chen@...iatek.com>,
        Jia-wei Chang <jia-wei.chang@...iatek.com>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org,
        Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR'



On 16/02/2023 14:25, Roger Lu wrote:
> nvmem_cell_get() cannot return NULL so checking for NULL is wrong here.
> 
> Signed-off-by: Roger Lu <roger.lu@...iatek.com>
> Fixes: 6c7174fd90a4690 ("soc: mediatek: mtk-svs: use svs get efuse common function")
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Dan Carpenter <error27@...il.com>
> Link: https://lore.kernel.org/r/202302160720.N64SWT4l-lkp@intel.com/

Applied, thanks.

> ---
>   drivers/soc/mediatek/mtk-svs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
> index a7eb019b5157..8127fb6d587b 100644
> --- a/drivers/soc/mediatek/mtk-svs.c
> +++ b/drivers/soc/mediatek/mtk-svs.c
> @@ -1726,7 +1726,7 @@ static int svs_get_efuse_data(struct svs_platform *svsp,
>   	struct nvmem_cell *cell;
>   
>   	cell = nvmem_cell_get(svsp->dev, nvmem_cell_name);
> -	if (IS_ERR_OR_NULL(cell)) {
> +	if (IS_ERR(cell)) {
>   		dev_err(svsp->dev, "no \"%s\"? %ld\n",
>   			nvmem_cell_name, PTR_ERR(cell));
>   		return PTR_ERR(cell);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ