lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 25 Oct 2017 09:11:39 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     kbuild test robot <fengguang.wu@...el.com>
CC:     <kbuild-all@...org>, <linux-usb@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: xhci-mtk: fix ptr_ret.cocci warnings

On Wed, 2017-10-25 at 00:33 +0800, kbuild test robot wrote:
> drivers/usb/host/xhci-mtk.c:256:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> 
> 
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
> 
> Fixes: b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks")
> CC: Chunfeng Yun <chunfeng.yun@...iatek.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> ---
> 
Thanks

Acked-by: Chunfeng Yun <chunfeng.yun@...iatek.com>

>  xhci-mtk.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> --- a/drivers/usb/host/xhci-mtk.c
> +++ b/drivers/usb/host/xhci-mtk.c
> @@ -253,10 +253,7 @@ static int xhci_mtk_clks_get(struct xhci
>  		return PTR_ERR(mtk->mcu_clk);
>  
>  	mtk->dma_clk = optional_clk_get(dev, "dma_ck");
> -	if (IS_ERR(mtk->dma_clk))
> -		return PTR_ERR(mtk->dma_clk);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(mtk->dma_clk);
>  }
>  
>  static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)


Powered by blists - more mailing lists