Fixes coccicheck warning: drivers/pci/controller/dwc/pcie-kirin.c:141:1-3: WARNING: PTR_ERR_OR_ZERO can be used drivers/pci/controller/dwc/pcie-kirin.c:177:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: zhengbin <zhengbin13@xxxxxxxxxx> --- drivers/pci/controller/dwc/pcie-kirin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c index c19617a..5b2131f 100644 --- a/drivers/pci/controller/dwc/pcie-kirin.c +++ b/drivers/pci/controller/dwc/pcie-kirin.c @@ -138,10 +138,7 @@ static long kirin_pcie_get_clk(struct kirin_pcie *kirin_pcie, return PTR_ERR(kirin_pcie->apb_sys_clk); kirin_pcie->pcie_aclk = devm_clk_get(dev, "pcie_aclk"); - if (IS_ERR(kirin_pcie->pcie_aclk)) - return PTR_ERR(kirin_pcie->pcie_aclk); - - return 0; + return PTR_ERR_OR_ZERO(kirin_pcie->pcie_aclk); } static long kirin_pcie_get_resource(struct kirin_pcie *kirin_pcie, -- 2.7.4