[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200926124750.GO4282@kadam>
Date: Sat, 26 Sep 2020 15:47:50 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc: lkp@...el.com, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Kishon Vijay Abraham I <kishon@...com>
Subject: drivers/phy/mediatek/phy-mtk-tphy.c:955 mtk_phy_init() warn:
'instance->da_ref_clk' not released on lines: 952.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b463b6f69974867b3b5885de2f488d72e979a751
commit: 12d0c0bed3f473523fbb66db59db7d79982c0aff phy: phy-mtk-tphy: add a new reference clock
config: arm64-randconfig-m031-20200925 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
New smatch warnings:
drivers/phy/mediatek/phy-mtk-tphy.c:955 mtk_phy_init() warn: 'instance->da_ref_clk' not released on lines: 952.
Old smatch warnings:
drivers/phy/mediatek/phy-mtk-tphy.c:955 mtk_phy_init() warn: 'instance->ref_clk' not released on lines: 952.
vim +955 drivers/phy/mediatek/phy-mtk-tphy.c
8158e917d91cb0b drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2018-06-29 916
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 917 static int mtk_phy_init(struct phy *phy)
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 918 {
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 919 struct mtk_phy_instance *instance = phy_get_drvdata(phy);
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 920 struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent);
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 921 int ret;
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 922
15de15c6b45b87a drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 923 ret = clk_prepare_enable(instance->ref_clk);
15de15c6b45b87a drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 924 if (ret) {
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 925 dev_err(tphy->dev, "failed to enable ref_clk\n");
15de15c6b45b87a drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 926 return ret;
15de15c6b45b87a drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 927 }
15de15c6b45b87a drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 928
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 929 ret = clk_prepare_enable(instance->da_ref_clk);
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 930 if (ret) {
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 931 dev_err(tphy->dev, "failed to enable da_ref\n");
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 932 clk_disable_unprepare(instance->ref_clk);
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 933 return ret;
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 934 }
12d0c0bed3f4735 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2020-02-11 935
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 936 switch (instance->type) {
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 937 case PHY_TYPE_USB2:
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 938 u2_phy_instance_init(tphy, instance);
8158e917d91cb0b drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2018-06-29 939 u2_phy_props_set(tphy, instance);
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 940 break;
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 941 case PHY_TYPE_USB3:
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 942 u3_phy_instance_init(tphy, instance);
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 943 break;
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 944 case PHY_TYPE_PCIE:
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 945 pcie_phy_instance_init(tphy, instance);
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 946 break;
4ab26cb66a8cb3c drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 947 case PHY_TYPE_SATA:
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 948 sata_phy_instance_init(tphy, instance);
4ab26cb66a8cb3c drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 949 break;
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 950 default:
cd4ec4b03dc15b1 drivers/phy/mediatek/phy-mtk-tphy.c Chunfeng Yun 2017-08-03 951 dev_err(tphy->dev, "incompatible PHY type\n");
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 952 return -EINVAL;
Cleanup before returning?
clk_disable_unprepare(instance->ref_clk);
clk_disable_unprepare(instance->da_ref_clk);
return -EINVAL;
44a6d6ce6436a2b drivers/phy/phy-mt65xx-usb3.c Ryder Lee 2017-08-03 953 }
04466efca58f69f drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2017-03-31 954
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 @955 return 0;
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 956 }
dc7f190fd51f5c6 drivers/phy/phy-mt65xx-usb3.c Chunfeng Yun 2015-09-29 957
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32382 bytes)
Powered by blists - more mailing lists