On Fri, Jun 25, 2021 at 03:11:35PM +0300, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing > head: 5607fa6c3da3189de1bac356c73bc4fcaf4c0234 > commit: d4d6f03c4fb3a91dadfe147b47edd40e4d7e4d36 [96/222] serial: max310x: Try to get crystal clock rate from property > config: x86_64-randconfig-m001-20210622 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > > smatch warnings: > drivers/tty/serial/max310x.c:1430 max310x_probe() warn: 's->clk' not released on lines: 1296. > > vim +1430 drivers/tty/serial/max310x.c > 1285 } > 1286 > 1287 ret = clk_prepare_enable(s->clk); > 1288 if (ret) > 1289 return ret; > 1290 > 1291 freq = clk_get_rate(s->clk); > 1292 if (freq == 0) > 1293 freq = uartclk; > 1294 if (freq == 0) { > 1295 dev_err(dev, "Cannot get clock rate\n"); > 1296 return -EINVAL; > > goto out_clk? Right. I moved the code after the clk_prepare_enable() call and forgot to change the error path handling, thanks! I have just sent a fix. -- With Best Regards, Andy Shevchenko