]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 1 Aug 2022 11:42:02 +0000 (14:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:41 +0000 (13:22 +0200)
[ Upstream commit b66c882e34dd3bb8d55b513af5ed000b79923f43 ]

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: bd81715d4c39 ("mfd: intel_soc_pmic_core: ADD PWM lookup table for CRC PMIC based PWM")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/intel_soc_pmic_core.c

index c9f35378d39180d2f966c6a2fb4510824c2c6cf0..4d9b2ad9b086ddface48026eb4ee25b2af0eca8f 100644 (file)
@@ -111,6 +111,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;
 }