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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f78e47a-1f5b-7e33-0015-66d7c37c05e3@roeck-us.net>
Date:   Thu, 21 Jul 2022 20:42:45 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     williamsukatube@....com, kabel@...nel.org, wim@...ux-watchdog.org,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     William Dean <williamsukatube@...il.com>,
        Hacash Robot <hacashRobot@...tino.com>
Subject: Re: [PATCH] watchdog: armada_37xx_wdt: check the return value of
 devm_ioremap() in armada_37xx_wdt_probe()

On 7/21/22 20:09, williamsukatube@....com wrote:
> From: William Dean <williamsukatube@...il.com>
> 
> The function devm_ioremap() in armada_37xx_wdt_probe() can fail, so
> its return value should be checked.
> 
> Fixes: 54e3d9b518c8a ("watchdog: Add support for Armada 37xx CPU watchdog")
> Reported-by: Hacash Robot <hacashRobot@...tino.com>
> Signed-off-by: William Dean <williamsukatube@...il.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/watchdog/armada_37xx_wdt.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/watchdog/armada_37xx_wdt.c b/drivers/watchdog/armada_37xx_wdt.c
> index 1635f421ef2c..854b1cc723cb 100644
> --- a/drivers/watchdog/armada_37xx_wdt.c
> +++ b/drivers/watchdog/armada_37xx_wdt.c
> @@ -274,6 +274,8 @@ static int armada_37xx_wdt_probe(struct platform_device *pdev)
>   	if (!res)
>   		return -ENODEV;
>   	dev->reg = devm_ioremap(&pdev->dev, res->start, resource_size(res));
> +	if (!dev->reg)
> +		return -ENOMEM;
>   
>   	/* init clock */
>   	dev->clk = devm_clk_get(&pdev->dev, NULL);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ