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: <f30f2b92-e4ba-a5a4-54e1-926495338009@gmail.com>
Date:   Mon, 13 Mar 2023 09:50:41 +0200
From:   Matti Vaittinen <mazziesaccount@...il.com>
To:     Sebastian Reichel <sre@...nel.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCHv1 07/11] power: supply: generic-adc-battery: drop memory
 alloc error message

On 3/10/23 00:50, Sebastian Reichel wrote:
> Error printing happens automatically for memory allocation problems.
> 
> Signed-off-by: Sebastian Reichel <sre@...nel.org>

Reviewed-by: Matti Vaittinen <mazziesaccount@...il.com>

> ---
>   drivers/power/supply/generic-adc-battery.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c
> index d07eeb7d46d3..771e5cfc49c3 100644
> --- a/drivers/power/supply/generic-adc-battery.c
> +++ b/drivers/power/supply/generic-adc-battery.c
> @@ -243,10 +243,8 @@ static int gab_probe(struct platform_device *pdev)
>   	bool any = false;
>   
>   	adc_bat = devm_kzalloc(&pdev->dev, sizeof(*adc_bat), GFP_KERNEL);
> -	if (!adc_bat) {
> -		dev_err(&pdev->dev, "failed to allocate memory\n");
> +	if (!adc_bat)
>   		return -ENOMEM;
> -	}
>   
>   	psy_cfg.drv_data = adc_bat;
>   	psy_desc = &adc_bat->psy_desc;

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ