From patchwork Tue Jul 19 07:28:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9236133 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8235B600CB for ; Tue, 19 Jul 2016 07:27:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75604201F5 for ; Tue, 19 Jul 2016 07:27:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69E4F2074F; Tue, 19 Jul 2016 07:27:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90CEF201F5 for ; Tue, 19 Jul 2016 07:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752979AbcGSH1Y (ORCPT ); Tue, 19 Jul 2016 03:27:24 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:26224 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752862AbcGSH1Y (ORCPT ); Tue, 19 Jul 2016 03:27:24 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id u6J7R1k4010744; Tue, 19 Jul 2016 16:27:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u6J7R1k4010744 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1468913222; bh=omrw+v1wIEYbpsweGjvBOjRYLJfBfsGtlztTpUnOZSg=; h=From:To:Cc:Subject:Date:From; b=kSU4gbTcENf0skFjqhPuedHPrEax4HrM6iADDivvlzUaxJ63DO1gVo5rvlhCTroJh FAJVQrJ/iH6dAhPMVRkYDwJMh2zlpsdxSU6I+hCEeaktywxULsK/pDSADTUyD9spJz UWAY04pq304+qJyG6Ljuj62PcdZg3/QhIitRx2yHXLD/Fw/ZamBxpKsJwm1ynFOe6Y QzdLO9QOS6BKrmBSIcQD7veGWdDA83+rKjz6YsmeD+NqDulgfElYvwMVb6zPh673VX Ncsap6PQzHxafYDLsnOj1FFi8vjwsYEyMRhdeg/d3+puTCnZItb7e5m9VB3bsXkoiM PngGOjq1NOrPw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org Subject: [PATCH] clk: use ERR_CAST() for __clk_create_clk() Date: Tue, 19 Jul 2016 16:28:47 +0900 Message-Id: <1468913327-7876-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This code is clear enough, but the intention will be even clearer with this. Signed-off-by: Masahiro Yamada --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2bd00ef..953643f 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2430,7 +2430,7 @@ struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id, /* This is to allow this function to be chained to others */ if (IS_ERR_OR_NULL(hw)) - return (struct clk *) hw; + return ERR_CAST(hw); clk = kzalloc(sizeof(*clk), GFP_KERNEL); if (!clk)