summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-mtk.c
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2017-10-24 19:33:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-25 09:54:33 +0300
commitc929d84735bff4349bde809a5a8eb1996bf371f6 (patch)
treec6c09a9f7b2bcc25e07bdee7f27a2a94d5fa5c27 /drivers/usb/host/xhci-mtk.c
parent2d5afd51fe6b469e09d8d63fff041cbf4a987278 (diff)
downloadlinux-c929d84735bff4349bde809a5a8eb1996bf371f6.tar.xz
usb: xhci-mtk: fix ptr_ret.cocci warnings
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") Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mtk.c')
-rw-r--r--drivers/usb/host/xhci-mtk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index e5caabe7eebe..19d27ce31fdc 100644
--- 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_hcd_mtk *mtk)
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)