[tty:tty-testing 96/222] drivers/tty/serial/max310x.c:1430 max310x_probe() warn: 's->clk' not released on lines: 1296.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

  1297          }
  1298  
  1299          if (xtal) {
  1300                  fmin = 1000000;
  1301                  fmax = 4000000;
  1302          } else {
  1303                  fmin = 500000;
  1304                  fmax = 35000000;
  1305          }
  1306  
  1307          /* Check frequency limits */
  1308          if (freq < fmin || freq > fmax) {
  1309                  ret = -ERANGE;
  1310                  goto out_clk;
  1311          }
  1312  
  1313          s->regmap = regmap;
  1314          s->devtype = devtype;
  1315          dev_set_drvdata(dev, s);
  1316  
  1317          /* Check device to ensure we are talking to what we expect */
  1318          ret = devtype->detect(dev);
  1319          if (ret)
  1320                  goto out_clk;
  1321  
  1322          for (i = 0; i < devtype->nr; i++) {
  1323                  unsigned int offs = i << 5;
  1324  
  1325                  /* Reset port */
  1326                  regmap_write(s->regmap, MAX310X_MODE2_REG + offs,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux