From patchwork Fri Jul 24 07:40:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11682407 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15CD1618 for ; Fri, 24 Jul 2020 07:42:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFC3E2076A for ; Fri, 24 Jul 2020 07:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595576551; bh=HjMCchZVhPwTwkexmP6RnIdWez/ZPatrwHEB1rb8se0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=whzUXMC090goToVv6LOAW3HwzPiz9unEJwFSonBSphR+vHLUwDFz0NfRS1Y38jZAi vqaci4wYKFlFxJ9okr2SOedevb/j8JP3fgwSB1LcDDPR/80Pr4HelG4yQA7UtKFOub vsnFbo1YGN6c6OtklpHR4T0uTY1zYp9Dn75kiZ5g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbgGXHma (ORCPT ); Fri, 24 Jul 2020 03:42:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:36210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgGXHm3 (ORCPT ); Fri, 24 Jul 2020 03:42:29 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28BA920748; Fri, 24 Jul 2020 07:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595576548; bh=HjMCchZVhPwTwkexmP6RnIdWez/ZPatrwHEB1rb8se0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rito5OUzJvjz7P1joe3gLjI+5XcfUMEsocOFshLbAP/gH0z5iPUscAcJetiA2JIVn V5l9RMsSGwP0FDQ+C0t4jKv/a1BBdDnBpXvZV+AFw/bspRRsnth+hnzpa58gI4Q00p +7nmqtsliKdOt77lhWJdI6mA61AeVnkZ3d55o40w= From: Krzysztof Kozlowski To: Arnd Bergmann , Olof Johansson , Markus Mayer , bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , Santosh Shilimkar , Matthias Brugger , Roger Quadros , Tony Lindgren , Vladimir Zapolskiy , Kukjin Kim , Thierry Reding , Jonathan Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Andrew Morton , Linus Torvalds , Krzysztof Kozlowski Subject: [PATCH v2 16/29] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO Date: Fri, 24 Jul 2020 09:40:25 +0200 Message-Id: <20200724074038.5597-17-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200724074038.5597-1-krzk@kernel.org> References: <20200724074038.5597-1-krzk@kernel.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use PTR_ERR_OR_ZERO to make the code a little bit simpler. Signed-off-by: Krzysztof Kozlowski --- drivers/memory/renesas-rpc-if.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 88f51ec8f1d1..f2a33a1af836 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -199,10 +199,8 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev) rpc->dirmap = NULL; rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); - if (IS_ERR(rpc->rstc)) - return PTR_ERR(rpc->rstc); - return 0; + return PTR_ERR_OR_ZERO(rpc->rstc); } EXPORT_SYMBOL(rpcif_sw_init);