i2c: mt7621: fix missing clk_disable_unprepare() on error in mtk_i2c_probe()

Fix the missing clk_disable_unprepare() before return
from mtk_i2c_probe() in the error handling case.

Fixes: d04913ec5f89 ("i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by Yang Yingliang and committed by Wolfram Sang a2537c98 42226c98

Changed files
+8 -2
drivers
i2c
busses
+8 -2
drivers/i2c/busses/i2c-mt7621.c
··· 304 304 305 305 if (i2c->bus_freq == 0) { 306 306 dev_warn(i2c->dev, "clock-frequency 0 not supported\n"); 307 - return -EINVAL; 307 + ret = -EINVAL; 308 + goto err_disable_clk; 308 309 } 309 310 310 311 adap = &i2c->adap; ··· 323 322 324 323 ret = i2c_add_adapter(adap); 325 324 if (ret < 0) 326 - return ret; 325 + goto err_disable_clk; 327 326 328 327 dev_info(&pdev->dev, "clock %u kHz\n", i2c->bus_freq / 1000); 328 + 329 + return 0; 330 + 331 + err_disable_clk: 332 + clk_disable_unprepare(i2c->clk); 329 333 330 334 return ret; 331 335 }