From: Andy Shevchenko Date: Fri, 22 Jan 2016 14:48:46 +0000 (+0200) Subject: mfd: intel-lpss: Remove clock tree on error path X-Git-Tag: next-20160301~55^2~30 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a5e54b6afa7740b28196736cfd5435ac92c54cbc;p=karo-tx-linux.git mfd: intel-lpss: Remove clock tree on error path We forgot to remove the clock tree if something goes wrong in ->probe(). Add a call to intel_lpss_unregister_clock() on error path in ->probe() to fix the potential issue. Fixes: 4b45efe85263 (mfd: Add support for Intel Sunrisepoint LPSS devices) Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index 1743788f1595..1bbbe877ba7e 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -453,6 +453,7 @@ int intel_lpss_probe(struct device *dev, err_remove_ltr: intel_lpss_debugfs_remove(lpss); intel_lpss_ltr_hide(lpss); + intel_lpss_unregister_clock(lpss); err_clk_register: ida_simple_remove(&intel_lpss_devid_ida, lpss->devid);