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: <1860d4e8-2e3a-fe05-cab9-782f3e35b9ab@redhat.com>
Date:   Wed, 24 Mar 2021 10:25:13 +0100
From:   Hans de Goede <hdegoede@...hat.com>
To:     Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        Matti Vaittinen <mazziesaccount@...il.com>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Sebastian Reichel <sre@...nel.org>,
        Chen-Yu Tsai <wens@...e.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] extcon: extcon-gpio: Log error if work-queue init
 fails

Hi,

On 3/24/21 10:21 AM, Matti Vaittinen wrote:
> Add error print for probe failure when resource managed work-queue
> initialization fails.
> 
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> Suggested-by: Chanwoo Choi <cw00.choi@...sung.com>
> ---
>  drivers/extcon/extcon-gpio.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
> index 4105df74f2b0..8ea2cda8f7f3 100644
> --- a/drivers/extcon/extcon-gpio.c
> +++ b/drivers/extcon/extcon-gpio.c
> @@ -114,8 +114,10 @@ static int gpio_extcon_probe(struct platform_device *pdev)
>  		return ret;
>  
>  	ret = devm_delayed_work_autocancel(dev, &data->work, gpio_extcon_work);
> -	if (ret)
> +	if (ret) {
> +		dev_err(dev, "Failed to initialize delayed_work");
>  		return ret;
> +	}

The only ret which we can have here is -ENOMEM and as a rule we don't log
errors for those, because the kernel memory-management code already complains
loudly when this happens.

So IMHO this patch should be dropped.

Regards,

Hans




>  
>  	/*
>  	 * Request the interrupt of gpio to detect whether external connector
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ