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: <9b9abdf0-7cd5-df51-adbf-2225291f0dd2@redhat.com>
Date:   Mon, 1 Aug 2022 10:43:22 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Cc:     Lee Jones <lee@...nel.org>, Andy Shevchenko <andy@...nel.org>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v2 01/10] mfd: intel_soc_pmic: Fix an error handling path
 in intel_soc_pmic_i2c_probe()

Hi,

On 7/31/22 22:12, Andy Shevchenko wrote:
> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> 
> The commit in Fixes: has added a pwm_add_table() call in the probe() and
> a pwm_remove_table() call in the remove(), but forget to update the error
> handling path of the probe.
> 
> Add the missing pwm_remove_table() call.
> 
> Fixes: a3aa9a93df9f ("mfd: intel_soc_pmic_core: ADD PWM lookup table for CRC PMIC based PWM")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> v2: new patch
> 
>  drivers/mfd/intel_soc_pmic_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/intel_soc_pmic_core.c b/drivers/mfd/intel_soc_pmic_core.c
> index 5e8c94e008ed..85d070bce0e2 100644
> --- a/drivers/mfd/intel_soc_pmic_core.c
> +++ b/drivers/mfd/intel_soc_pmic_core.c
> @@ -77,6 +77,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,
>  	return 0;
>  
>  err_del_irq_chip:
> +	pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
>  	regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data);
>  	return ret;
>  }


Note alternatively we could just move the pwm_add_table() to just before the "return 0",
there is no strict ordering between adding the mfd devices and the pwm_add_table()
(the pwm device only becomes available after the pwm-driver has bound to the mfd
instantiated platform device which happens later).

IMHO that would be a bit cleaner.

Regards,

Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ