On 2019/11/18 20:46, Andrew Murray wrote: > On Mon, Nov 18, 2019 at 07:30:46PM +0800, zhengbin wrote: >> 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, > Thanks for these patches. Though if you resend these next time you ought > to put them in a single patch series with a cover letter. > > I'm not sure on the views of maintainers for other parts of the kernel > however for PCI this type of change has previously been rejected, see: > > https://lkml.org/lkml/2019/5/31/535 got that, thanks. please ignore other pci patches. > > I guess coccicheck isn't aware of this. > > Thanks, > > Andrew Murray > >> -- >> 2.7.4 >> > . >