From patchwork Sun Aug 27 06:31:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 9923705 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 DF68660329 for ; Sun, 27 Aug 2017 06:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C84B8285E9 for ; Sun, 27 Aug 2017 06:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD0B428613; Sun, 27 Aug 2017 06:32:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Flag: YES X-Spam-Level: ** X-Spam-Status: Yes, score=2.7 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 X-Spam-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [65.50.211.133 listed in list.dnswl.org] * 3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [103.46.192.10 listed in zen.spamhaus.org] * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [103.46.192.10 listed in dnsbl.sorbs.net] * 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (himanshujha199640[at]gmail.com) * 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is * CUSTOM_MED * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 689C1285E9 for ; Sun, 27 Aug 2017 06:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ib6ixqoLN6MG78qj8kBSzEMWfnGIIW7BgaUYKWkjvOs=; b=W1y HdwVh4fHU4HlzCQHQlFeIQgTnmcffpyytvz3mI5LUEWWnnbQanbEyt8VIGp1euHRdbR4ZeuA5FxaS dWe3Rd3DEy6A/ERnv9ZKbL+gMZlonXSJPJDPsG1kuHDZLoXy3P1XGgDNLaU4z06/20OUMLMODASCy yXgvSVadegCWQl5pjjTtHLo8BgXe/hrZtp5+gxGFdT55uGZScUzPVvLb29U2MY6bxDuXevbkP81U7 3Bv/5pa3uPAtRAl6CT0Fz8vT72edkER/AavuB1hloqG1YvC/MCkmlqwUzr77Fa2sJAiukgMkc2Smc n7PO5rQ69M+veaSPXTe224zB7+2K0LA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dlr7W-0001UU-Ik; Sun, 27 Aug 2017 06:32:30 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dlr7S-0001Pw-Jf for linux-arm-kernel@lists.infradead.org; Sun, 27 Aug 2017 06:32:28 +0000 Received: by mail-pg0-x242.google.com with SMTP id 63so3920086pgc.1 for ; Sat, 26 Aug 2017 23:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=pdPmTHd0ANqad58PzKKtjpA1LgL43CNbMd2tDj/NZN4=; b=GuVP1NYqlwPUgB2CKrE714mGpwqWzFyzyzyQUgj/St3X1pmeKxjXBHKkv1P8hE72bz x2R+0EOqVipZf8OpcbqkpVrsj/ZArnnoSBxiicn2jrhPEEvJlM6D7mjS2befpJ/1VdEO 8d8wVqNl2Kw7kePCWLEMDi9z5J1S2ZRP3KzeVNQRKadrU9Ral19uHUKfeXhN/F3WPPw9 SGMM2x+34qekSHLvMpbRJm6OX2aCZfmz+U+ieeNwY2U+xtmUFbRMB5JkAk4jdkTBakSC AFIkbkiYWR+xVloj1p/nE3A6M9vEzfPs2FtcY7U79hIkTP9UdJ+fnz0zZ/v95rTLbWBB HGbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pdPmTHd0ANqad58PzKKtjpA1LgL43CNbMd2tDj/NZN4=; b=MHPFaGYUy9GACiTsFylHyTrkRlcXtbLqvZkSBOL4T/A+nLXuE3GSSEHofuyvPQDH3Z smv8F9jrSeJgaui+k0ZkT0H7+f9h652/aD/RZ+6m4vbUiIx0AzKO6OCGmbH56gJKlCiD IbCGVn+RwIA/e/txGYef1uUHVW49KoJC8SdlNvhc889g4IcdbpkR0dq4DSt77m9ABotG ozHyqNgBGbOwwM3754FLBlUnJ9WENxXj6rtukxHL9JbzdDN3cXSKdvY6bg9BqtjL7P5N Q7oYQ/xnedK7cPhm+mTPZaztV3zrQpnJGJ8CzI3wYpfuAXjXkyAJ16L3+tlpS1bOd0ha EXGw== X-Gm-Message-State: AHYfb5htn4IjEwLK030vAj3btRiO/REVWGcsgVUiEQ4SVkiicF1FVMko DOUVqeIQk8VWeA== X-Received: by 10.99.137.193 with SMTP id v184mr3479651pgd.279.1503815524669; Sat, 26 Aug 2017 23:32:04 -0700 (PDT) Received: from localhost.localdomain ([103.46.192.10]) by smtp.gmail.com with ESMTPSA id g86sm14506516pfd.110.2017.08.26.23.32.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 26 Aug 2017 23:32:03 -0700 (PDT) From: Himanshu Jha To: gregkh@linuxfoundation.org Subject: [PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO Date: Sun, 27 Aug 2017 12:01:41 +0530 Message-Id: <1503815501-9205-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170826_233226_882581_4F89D53D X-CRM114-Status: UNSURE ( 8.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Himanshu Jha , linux-serial@vger.kernel.org, jslaby@suse.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha Reviewed-by: Matthias Brugger --- drivers/tty/serial/8250/8250_mtk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index ce0cc47..fb45770 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -171,10 +171,7 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p, } data->bus_clk = devm_clk_get(&pdev->dev, "bus"); - if (IS_ERR(data->bus_clk)) - return PTR_ERR(data->bus_clk); - - return 0; + return PTR_ERR_OR_ZERO(data->bus_clk); } static int mtk8250_probe(struct platform_device *pdev)