From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/tty/serial/uartlite.c:810 ulite_probe() warn: 'pdata->clk' not released on lines: 802.
Date: Wed, 16 Sep 2020 19:25:21 +0800 [thread overview]
Message-ID: <202009161914.S9NNlaDA%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8040 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4f28bb3daf3265d6bc5f73b497306985bb23ab
commit: f4c47547b40a212f4eb017297f9d232ac09f7aaf Revert "serial-uartlite: Move the uart register"
date: 10 months ago
:::::: branch date: 2 days ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-m001-20200916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>
New smatch warnings:
drivers/tty/serial/uartlite.c:810 ulite_probe() warn: 'pdata->clk' not released on lines: 802.
Old smatch warnings:
drivers/tty/serial/uartlite.c:375 ulite_request_port() warn: 'port->membase' not released on lines: 364.
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f4c47547b40a212f4eb017297f9d232ac09f7aaf
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f4c47547b40a212f4eb017297f9d232ac09f7aaf
vim +810 drivers/tty/serial/uartlite.c
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 752
9671f09921d93e drivers/tty/serial/uartlite.c Bill Pemberton 2012-11-19 753 static int ulite_probe(struct platform_device *pdev)
238b8721a554a3 drivers/serial/uartlite.c Peter Korsgaard 2006-12-06 754 {
5c90c07b98c021 drivers/tty/serial/uartlite.c Michal Simek 2015-04-13 755 struct resource *res;
da7bf20e775804 drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 756 struct uartlite_data *pdata;
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 757 int irq, ret;
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 758 int id = pdev->id;
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 759 #ifdef CONFIG_OF
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 760 const __be32 *prop;
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 761
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 762 prop = of_get_property(pdev->dev.of_node, "port-number", NULL);
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 763 if (prop)
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 764 id = be32_to_cpup(prop);
e5263a517688b8 drivers/tty/serial/uartlite.c Grant Likely 2011-02-22 765 #endif
da7bf20e775804 drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 766 pdata = devm_kzalloc(&pdev->dev, sizeof(struct uartlite_data),
da7bf20e775804 drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 767 GFP_KERNEL);
da7bf20e775804 drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 768 if (!pdata)
da7bf20e775804 drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 769 return -ENOMEM;
238b8721a554a3 drivers/serial/uartlite.c Peter Korsgaard 2006-12-06 770
8fa7b6100693e0 drivers/serial/uartlite.c Grant Likely 2007-10-02 771 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
8fa7b6100693e0 drivers/serial/uartlite.c Grant Likely 2007-10-02 772 if (!res)
8fa7b6100693e0 drivers/serial/uartlite.c Grant Likely 2007-10-02 773 return -ENODEV;
238b8721a554a3 drivers/serial/uartlite.c Peter Korsgaard 2006-12-06 774
5c90c07b98c021 drivers/tty/serial/uartlite.c Michal Simek 2015-04-13 775 irq = platform_get_irq(pdev, 0);
5c90c07b98c021 drivers/tty/serial/uartlite.c Michal Simek 2015-04-13 776 if (irq <= 0)
5c90c07b98c021 drivers/tty/serial/uartlite.c Michal Simek 2015-04-13 777 return -ENXIO;
238b8721a554a3 drivers/serial/uartlite.c Peter Korsgaard 2006-12-06 778
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 779 pdata->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 780 if (IS_ERR(pdata->clk)) {
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 781 if (PTR_ERR(pdata->clk) != -ENOENT)
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 782 return PTR_ERR(pdata->clk);
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 783
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 784 /*
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 785 * Clock framework support is optional, continue on
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 786 * anyways if we don't find a matching clock.
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 787 */
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 788 pdata->clk = NULL;
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 789 }
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 790
ea42d7a67a9e2b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-08-06 791 ret = clk_prepare_enable(pdata->clk);
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 792 if (ret) {
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 793 dev_err(&pdev->dev, "Failed to prepare clock\n");
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 794 return ret;
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 795 }
14288befeb572b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-07-21 796
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 797 if (!ulite_uart_driver.state) {
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 798 dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n");
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 799 ret = uart_register_driver(&ulite_uart_driver);
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 800 if (ret < 0) {
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 801 dev_err(&pdev->dev, "Failed to register driver\n");
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 802 return ret;
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 803 }
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 804 }
f4c47547b40a21 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 805
ea42d7a67a9e2b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-08-06 806 ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
ea42d7a67a9e2b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-08-06 807
07e5d4ff125ad0 drivers/tty/serial/uartlite.c Greg Kroah-Hartman 2019-11-14 808 clk_disable(pdata->clk);
ea42d7a67a9e2b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-08-06 809
ea42d7a67a9e2b drivers/tty/serial/uartlite.c Shubhrajyoti Datta 2018-08-06 @810 return ret;
8fa7b6100693e0 drivers/serial/uartlite.c Grant Likely 2007-10-02 811 }
238b8721a554a3 drivers/serial/uartlite.c Peter Korsgaard 2006-12-06 812
:::::: The code at line 810 was first introduced by commit
:::::: ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f tty: serial: uartlite: Enable clocks at probe
:::::: TO: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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: 30662 bytes --]
next reply other threads:[~2020-09-16 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 11:25 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-16 13:14 drivers/tty/serial/uartlite.c:810 ulite_probe() warn: 'pdata->clk' not released on lines: 802 kernel test robot
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=202009161914.S9NNlaDA%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.