From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386, 393.
Date: Tue, 22 Jun 2021 20:51:31 +0800 [thread overview]
Message-ID: <202106222029.VUDexGpd-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5623 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Neil Armstrong <narmstrong@baylibre.com>
CC: Vinod Koul <vkoul@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a96bfed64c8986d6404e553f18203cae1f5ac7e6
commit: 76aefb221146dbe0de124f566329c76d5dcf118a phy: amlogic: Add AXG MIPI D-PHY driver
date: 7 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 7 months ago
config: powerpc64-randconfig-m031-20210622 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386,393.
vim +393 drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
76aefb221146db Neil Armstrong 2020-11-16 332
76aefb221146db Neil Armstrong 2020-11-16 333 static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
76aefb221146db Neil Armstrong 2020-11-16 334 {
76aefb221146db Neil Armstrong 2020-11-16 335 struct device *dev = &pdev->dev;
76aefb221146db Neil Armstrong 2020-11-16 336 struct phy_provider *phy_provider;
76aefb221146db Neil Armstrong 2020-11-16 337 struct resource *res;
76aefb221146db Neil Armstrong 2020-11-16 338 struct phy_meson_axg_mipi_dphy_priv *priv;
76aefb221146db Neil Armstrong 2020-11-16 339 struct phy *phy;
76aefb221146db Neil Armstrong 2020-11-16 340 void __iomem *base;
76aefb221146db Neil Armstrong 2020-11-16 341 int ret;
76aefb221146db Neil Armstrong 2020-11-16 342
76aefb221146db Neil Armstrong 2020-11-16 343 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
76aefb221146db Neil Armstrong 2020-11-16 344 if (!priv)
76aefb221146db Neil Armstrong 2020-11-16 345 return -ENOMEM;
76aefb221146db Neil Armstrong 2020-11-16 346
76aefb221146db Neil Armstrong 2020-11-16 347 priv->dev = dev;
76aefb221146db Neil Armstrong 2020-11-16 348 platform_set_drvdata(pdev, priv);
76aefb221146db Neil Armstrong 2020-11-16 349
76aefb221146db Neil Armstrong 2020-11-16 350 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
76aefb221146db Neil Armstrong 2020-11-16 351 base = devm_ioremap_resource(dev, res);
76aefb221146db Neil Armstrong 2020-11-16 352 if (IS_ERR(base))
76aefb221146db Neil Armstrong 2020-11-16 353 return PTR_ERR(base);
76aefb221146db Neil Armstrong 2020-11-16 354
76aefb221146db Neil Armstrong 2020-11-16 355 priv->regmap = devm_regmap_init_mmio(dev, base,
76aefb221146db Neil Armstrong 2020-11-16 356 &phy_meson_axg_mipi_dphy_regmap_conf);
76aefb221146db Neil Armstrong 2020-11-16 357 if (IS_ERR(priv->regmap))
76aefb221146db Neil Armstrong 2020-11-16 358 return PTR_ERR(priv->regmap);
76aefb221146db Neil Armstrong 2020-11-16 359
76aefb221146db Neil Armstrong 2020-11-16 360 priv->clk = devm_clk_get(dev, "pclk");
76aefb221146db Neil Armstrong 2020-11-16 361 if (IS_ERR(priv->clk))
76aefb221146db Neil Armstrong 2020-11-16 362 return PTR_ERR(priv->clk);
76aefb221146db Neil Armstrong 2020-11-16 363
76aefb221146db Neil Armstrong 2020-11-16 364 priv->reset = devm_reset_control_get(dev, "phy");
76aefb221146db Neil Armstrong 2020-11-16 365 if (IS_ERR(priv->reset))
76aefb221146db Neil Armstrong 2020-11-16 366 return PTR_ERR(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 367
76aefb221146db Neil Armstrong 2020-11-16 368 priv->analog = devm_phy_get(dev, "analog");
76aefb221146db Neil Armstrong 2020-11-16 369 if (IS_ERR(priv->analog))
76aefb221146db Neil Armstrong 2020-11-16 370 return PTR_ERR(priv->analog);
76aefb221146db Neil Armstrong 2020-11-16 371
76aefb221146db Neil Armstrong 2020-11-16 372 ret = clk_prepare_enable(priv->clk);
76aefb221146db Neil Armstrong 2020-11-16 373 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 374 return ret;
76aefb221146db Neil Armstrong 2020-11-16 375
76aefb221146db Neil Armstrong 2020-11-16 376 ret = reset_control_deassert(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 377 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 378 return ret;
76aefb221146db Neil Armstrong 2020-11-16 379
76aefb221146db Neil Armstrong 2020-11-16 380 phy = devm_phy_create(dev, NULL, &phy_meson_axg_mipi_dphy_ops);
76aefb221146db Neil Armstrong 2020-11-16 381 if (IS_ERR(phy)) {
76aefb221146db Neil Armstrong 2020-11-16 382 ret = PTR_ERR(phy);
76aefb221146db Neil Armstrong 2020-11-16 383 if (ret != -EPROBE_DEFER)
76aefb221146db Neil Armstrong 2020-11-16 384 dev_err(dev, "failed to create PHY\n");
76aefb221146db Neil Armstrong 2020-11-16 385
76aefb221146db Neil Armstrong 2020-11-16 386 return ret;
76aefb221146db Neil Armstrong 2020-11-16 387 }
76aefb221146db Neil Armstrong 2020-11-16 388
76aefb221146db Neil Armstrong 2020-11-16 389 phy_set_drvdata(phy, priv);
76aefb221146db Neil Armstrong 2020-11-16 390
76aefb221146db Neil Armstrong 2020-11-16 391 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
76aefb221146db Neil Armstrong 2020-11-16 392
76aefb221146db Neil Armstrong 2020-11-16 @393 return PTR_ERR_OR_ZERO(phy_provider);
76aefb221146db Neil Armstrong 2020-11-16 394 }
76aefb221146db Neil Armstrong 2020-11-16 395
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33418 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386, 393.
Date: Tue, 22 Jun 2021 15:57:04 +0300 [thread overview]
Message-ID: <202106222029.VUDexGpd-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5549 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a96bfed64c8986d6404e553f18203cae1f5ac7e6
commit: 76aefb221146dbe0de124f566329c76d5dcf118a phy: amlogic: Add AXG MIPI D-PHY driver
config: powerpc64-randconfig-m031-20210622 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386,393.
vim +393 drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
76aefb221146db Neil Armstrong 2020-11-16 333 static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
76aefb221146db Neil Armstrong 2020-11-16 334 {
76aefb221146db Neil Armstrong 2020-11-16 335 struct device *dev = &pdev->dev;
76aefb221146db Neil Armstrong 2020-11-16 336 struct phy_provider *phy_provider;
76aefb221146db Neil Armstrong 2020-11-16 337 struct resource *res;
76aefb221146db Neil Armstrong 2020-11-16 338 struct phy_meson_axg_mipi_dphy_priv *priv;
76aefb221146db Neil Armstrong 2020-11-16 339 struct phy *phy;
76aefb221146db Neil Armstrong 2020-11-16 340 void __iomem *base;
76aefb221146db Neil Armstrong 2020-11-16 341 int ret;
76aefb221146db Neil Armstrong 2020-11-16 342
76aefb221146db Neil Armstrong 2020-11-16 343 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
76aefb221146db Neil Armstrong 2020-11-16 344 if (!priv)
76aefb221146db Neil Armstrong 2020-11-16 345 return -ENOMEM;
76aefb221146db Neil Armstrong 2020-11-16 346
76aefb221146db Neil Armstrong 2020-11-16 347 priv->dev = dev;
76aefb221146db Neil Armstrong 2020-11-16 348 platform_set_drvdata(pdev, priv);
76aefb221146db Neil Armstrong 2020-11-16 349
76aefb221146db Neil Armstrong 2020-11-16 350 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
76aefb221146db Neil Armstrong 2020-11-16 351 base = devm_ioremap_resource(dev, res);
76aefb221146db Neil Armstrong 2020-11-16 352 if (IS_ERR(base))
76aefb221146db Neil Armstrong 2020-11-16 353 return PTR_ERR(base);
76aefb221146db Neil Armstrong 2020-11-16 354
76aefb221146db Neil Armstrong 2020-11-16 355 priv->regmap = devm_regmap_init_mmio(dev, base,
76aefb221146db Neil Armstrong 2020-11-16 356 &phy_meson_axg_mipi_dphy_regmap_conf);
76aefb221146db Neil Armstrong 2020-11-16 357 if (IS_ERR(priv->regmap))
76aefb221146db Neil Armstrong 2020-11-16 358 return PTR_ERR(priv->regmap);
76aefb221146db Neil Armstrong 2020-11-16 359
76aefb221146db Neil Armstrong 2020-11-16 360 priv->clk = devm_clk_get(dev, "pclk");
76aefb221146db Neil Armstrong 2020-11-16 361 if (IS_ERR(priv->clk))
76aefb221146db Neil Armstrong 2020-11-16 362 return PTR_ERR(priv->clk);
76aefb221146db Neil Armstrong 2020-11-16 363
76aefb221146db Neil Armstrong 2020-11-16 364 priv->reset = devm_reset_control_get(dev, "phy");
76aefb221146db Neil Armstrong 2020-11-16 365 if (IS_ERR(priv->reset))
76aefb221146db Neil Armstrong 2020-11-16 366 return PTR_ERR(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 367
76aefb221146db Neil Armstrong 2020-11-16 368 priv->analog = devm_phy_get(dev, "analog");
76aefb221146db Neil Armstrong 2020-11-16 369 if (IS_ERR(priv->analog))
76aefb221146db Neil Armstrong 2020-11-16 370 return PTR_ERR(priv->analog);
76aefb221146db Neil Armstrong 2020-11-16 371
76aefb221146db Neil Armstrong 2020-11-16 372 ret = clk_prepare_enable(priv->clk);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this worth unwinding if we hit an error later on? I doubt it really
matters. #StaticCheckerProblems
76aefb221146db Neil Armstrong 2020-11-16 373 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 374 return ret;
76aefb221146db Neil Armstrong 2020-11-16 375
76aefb221146db Neil Armstrong 2020-11-16 376 ret = reset_control_deassert(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 377 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 378 return ret;
^^^^^^^^^^
76aefb221146db Neil Armstrong 2020-11-16 379
76aefb221146db Neil Armstrong 2020-11-16 380 phy = devm_phy_create(dev, NULL, &phy_meson_axg_mipi_dphy_ops);
76aefb221146db Neil Armstrong 2020-11-16 381 if (IS_ERR(phy)) {
76aefb221146db Neil Armstrong 2020-11-16 382 ret = PTR_ERR(phy);
76aefb221146db Neil Armstrong 2020-11-16 383 if (ret != -EPROBE_DEFER)
76aefb221146db Neil Armstrong 2020-11-16 384 dev_err(dev, "failed to create PHY\n");
76aefb221146db Neil Armstrong 2020-11-16 385
76aefb221146db Neil Armstrong 2020-11-16 386 return ret;
76aefb221146db Neil Armstrong 2020-11-16 387 }
76aefb221146db Neil Armstrong 2020-11-16 388
76aefb221146db Neil Armstrong 2020-11-16 389 phy_set_drvdata(phy, priv);
76aefb221146db Neil Armstrong 2020-11-16 390
76aefb221146db Neil Armstrong 2020-11-16 391 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
76aefb221146db Neil Armstrong 2020-11-16 392
76aefb221146db Neil Armstrong 2020-11-16 @393 return PTR_ERR_OR_ZERO(phy_provider);
76aefb221146db Neil Armstrong 2020-11-16 394 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Neil Armstrong <narmstrong@baylibre.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org, Vinod Koul <vkoul@kernel.org>
Subject: drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386,393.
Date: Tue, 22 Jun 2021 15:57:04 +0300 [thread overview]
Message-ID: <202106222029.VUDexGpd-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a96bfed64c8986d6404e553f18203cae1f5ac7e6
commit: 76aefb221146dbe0de124f566329c76d5dcf118a phy: amlogic: Add AXG MIPI D-PHY driver
config: powerpc64-randconfig-m031-20210622 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386,393.
vim +393 drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
76aefb221146db Neil Armstrong 2020-11-16 333 static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
76aefb221146db Neil Armstrong 2020-11-16 334 {
76aefb221146db Neil Armstrong 2020-11-16 335 struct device *dev = &pdev->dev;
76aefb221146db Neil Armstrong 2020-11-16 336 struct phy_provider *phy_provider;
76aefb221146db Neil Armstrong 2020-11-16 337 struct resource *res;
76aefb221146db Neil Armstrong 2020-11-16 338 struct phy_meson_axg_mipi_dphy_priv *priv;
76aefb221146db Neil Armstrong 2020-11-16 339 struct phy *phy;
76aefb221146db Neil Armstrong 2020-11-16 340 void __iomem *base;
76aefb221146db Neil Armstrong 2020-11-16 341 int ret;
76aefb221146db Neil Armstrong 2020-11-16 342
76aefb221146db Neil Armstrong 2020-11-16 343 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
76aefb221146db Neil Armstrong 2020-11-16 344 if (!priv)
76aefb221146db Neil Armstrong 2020-11-16 345 return -ENOMEM;
76aefb221146db Neil Armstrong 2020-11-16 346
76aefb221146db Neil Armstrong 2020-11-16 347 priv->dev = dev;
76aefb221146db Neil Armstrong 2020-11-16 348 platform_set_drvdata(pdev, priv);
76aefb221146db Neil Armstrong 2020-11-16 349
76aefb221146db Neil Armstrong 2020-11-16 350 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
76aefb221146db Neil Armstrong 2020-11-16 351 base = devm_ioremap_resource(dev, res);
76aefb221146db Neil Armstrong 2020-11-16 352 if (IS_ERR(base))
76aefb221146db Neil Armstrong 2020-11-16 353 return PTR_ERR(base);
76aefb221146db Neil Armstrong 2020-11-16 354
76aefb221146db Neil Armstrong 2020-11-16 355 priv->regmap = devm_regmap_init_mmio(dev, base,
76aefb221146db Neil Armstrong 2020-11-16 356 &phy_meson_axg_mipi_dphy_regmap_conf);
76aefb221146db Neil Armstrong 2020-11-16 357 if (IS_ERR(priv->regmap))
76aefb221146db Neil Armstrong 2020-11-16 358 return PTR_ERR(priv->regmap);
76aefb221146db Neil Armstrong 2020-11-16 359
76aefb221146db Neil Armstrong 2020-11-16 360 priv->clk = devm_clk_get(dev, "pclk");
76aefb221146db Neil Armstrong 2020-11-16 361 if (IS_ERR(priv->clk))
76aefb221146db Neil Armstrong 2020-11-16 362 return PTR_ERR(priv->clk);
76aefb221146db Neil Armstrong 2020-11-16 363
76aefb221146db Neil Armstrong 2020-11-16 364 priv->reset = devm_reset_control_get(dev, "phy");
76aefb221146db Neil Armstrong 2020-11-16 365 if (IS_ERR(priv->reset))
76aefb221146db Neil Armstrong 2020-11-16 366 return PTR_ERR(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 367
76aefb221146db Neil Armstrong 2020-11-16 368 priv->analog = devm_phy_get(dev, "analog");
76aefb221146db Neil Armstrong 2020-11-16 369 if (IS_ERR(priv->analog))
76aefb221146db Neil Armstrong 2020-11-16 370 return PTR_ERR(priv->analog);
76aefb221146db Neil Armstrong 2020-11-16 371
76aefb221146db Neil Armstrong 2020-11-16 372 ret = clk_prepare_enable(priv->clk);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this worth unwinding if we hit an error later on? I doubt it really
matters. #StaticCheckerProblems
76aefb221146db Neil Armstrong 2020-11-16 373 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 374 return ret;
76aefb221146db Neil Armstrong 2020-11-16 375
76aefb221146db Neil Armstrong 2020-11-16 376 ret = reset_control_deassert(priv->reset);
76aefb221146db Neil Armstrong 2020-11-16 377 if (ret)
76aefb221146db Neil Armstrong 2020-11-16 378 return ret;
^^^^^^^^^^
76aefb221146db Neil Armstrong 2020-11-16 379
76aefb221146db Neil Armstrong 2020-11-16 380 phy = devm_phy_create(dev, NULL, &phy_meson_axg_mipi_dphy_ops);
76aefb221146db Neil Armstrong 2020-11-16 381 if (IS_ERR(phy)) {
76aefb221146db Neil Armstrong 2020-11-16 382 ret = PTR_ERR(phy);
76aefb221146db Neil Armstrong 2020-11-16 383 if (ret != -EPROBE_DEFER)
76aefb221146db Neil Armstrong 2020-11-16 384 dev_err(dev, "failed to create PHY\n");
76aefb221146db Neil Armstrong 2020-11-16 385
76aefb221146db Neil Armstrong 2020-11-16 386 return ret;
76aefb221146db Neil Armstrong 2020-11-16 387 }
76aefb221146db Neil Armstrong 2020-11-16 388
76aefb221146db Neil Armstrong 2020-11-16 389 phy_set_drvdata(phy, priv);
76aefb221146db Neil Armstrong 2020-11-16 390
76aefb221146db Neil Armstrong 2020-11-16 391 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
76aefb221146db Neil Armstrong 2020-11-16 392
76aefb221146db Neil Armstrong 2020-11-16 @393 return PTR_ERR_OR_ZERO(phy_provider);
76aefb221146db Neil Armstrong 2020-11-16 394 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2021-06-22 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 12:51 kernel test robot [this message]
2021-06-22 12:57 ` drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386,393 Dan Carpenter
2021-06-22 12:57 ` drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c:393 phy_meson_axg_mipi_dphy_probe() warn: 'priv->clk' not released on lines: 386, 393 Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202106222029.VUDexGpd-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.