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: <20181206205155.eucqfsq2xnk7kks5@earth.universe>
Date:   Thu, 6 Dec 2018 21:51:55 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Keerthy <j-keerthy@...com>
Cc:     tony@...mide.com, lee.jones@...aro.org, t-kristo@...com,
        linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: tps65218: Use devm_regmap_add_irq_chip and clean up
 error path in probe

Hi,

On Thu, Dec 06, 2018 at 11:07:44PM +0530, Keerthy wrote:
> Use devm_regmap_add_irq_chip and clean up error path in probe.
> 
> Reported-by: Christian Hohnstaedt <Christian.Hohnstaedt@...o.com>
> Signed-off-by: Keerthy <j-keerthy@...com>
> ---
> 
> Boot tested on am437x-gp-evm.

This is missing cleanup of remove path?

-- Sebastian

>  drivers/mfd/tps65218.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
> index 910f569..2383621 100644
> --- a/drivers/mfd/tps65218.c
> +++ b/drivers/mfd/tps65218.c
> @@ -235,9 +235,9 @@ static int tps65218_probe(struct i2c_client *client,
>  
>  	mutex_init(&tps->tps_lock);
>  
> -	ret = regmap_add_irq_chip(tps->regmap, tps->irq,
> -			IRQF_ONESHOT, 0, &tps65218_irq_chip,
> -			&tps->irq_data);
> +	ret = devm_regmap_add_irq_chip(&client->dev, tps->regmap, tps->irq,
> +				       IRQF_ONESHOT, 0, &tps65218_irq_chip,
> +				       &tps->irq_data);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -253,14 +253,6 @@ static int tps65218_probe(struct i2c_client *client,
>  			      ARRAY_SIZE(tps65218_cells), NULL, 0,
>  			      regmap_irq_get_domain(tps->irq_data));
>  
> -	if (ret < 0)
> -		goto err_irq;
> -
> -	return 0;
> -
> -err_irq:
> -	regmap_del_irq_chip(tps->irq, tps->irq_data);
> -
>  	return ret;
>  }
>  
> -- 
> 1.9.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ