From patchwork Tue Oct 24 17:35:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10025155 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 DB12460375 for ; Tue, 24 Oct 2017 17:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7639285C4 for ; Tue, 24 Oct 2017 17:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBD4728A4B; Tue, 24 Oct 2017 17:35:33 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 75756285C4 for ; Tue, 24 Oct 2017 17:35:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE7816E58A; Tue, 24 Oct 2017 17:35:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.17.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBFDC6E58A for ; Tue, 24 Oct 2017 17:35:30 +0000 (UTC) Received: from [192.168.1.2] ([92.227.117.134]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M6mL2-1dJbiL11mu-00wStT; Tue, 24 Oct 2017 19:35:25 +0200 Subject: [PATCH 2/2] drm/tegra: Use an error code directly in tegra_output_probe() From: SF Markus Elfring To: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, David Airlie , Jonathan Hunter , Thierry Reding References: Message-ID: Date: Tue, 24 Oct 2017 19:35:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:WJvt+5SWc79nUQrGXZyWIEikNL/FCxK3UWjYrc6gTCSgCE/qhI5 4b0cOoJRo430JKE5K0OBGx0EgLH9dW6JMLpZn4eC7MprG9j+RycG+UVAKWz6QOMuzJ6nIA4 rnY5V1weMiuvKHwlS/pmlINwPEslvSF6T1Oz7j1aaATFZVE3OiCy6sisJGfcSnWxbh9LD1E kr9JEhJVMHbk9ByXggvSw== X-UI-Out-Filterresults: notjunk:1; V01:K0:lgNq1FUYyS8=:6GmL6crm96sSCmCT3ZOzFL 8S3hJJHfEH9aG202jRUuETYihmwHF9EMXxToXSKev+t2OycOgVfVPZz4wyVGDJ4zKa6JJ+wLF JSKjRy6OLSRjh/n08ZoTRZjq7HL2+aibYrnlc/ApV3AGD81pHuXF2bvUlRXG7ti3yGxeOp+ta 7tziyRTFHNKzaQkQ2w/2ZUPsEHvLH0+rAJq1wlvx6PfIge+RsR6UHhyVpJwc3NTbLedK6JweS bJWiYXsO0Xtss43r6+M2vbp1hDAL/G0NrxtYzoxhm3hr3hIpHee1s9AjtBjOV9tuRKDAQJDTT iyquEO0mEDTrUVll9XecQRHKVjpuiWn6pj+7XLlaHuoGF+skf33ey1vucEguSyYYuvauz3u5t ZF6MC516ieo448phxOzOY8c4TS0XEouJa90s4+sUC/2boQpB3pcbK81CCyAeEHB+rzx4twhGV pehq5fPn+42FZdXPDnm+uiZP8Td4+Ud+aKDWxb7sB6n82vvrnpXmViAgYPP8ADKXj04YIhP9G 6wAjrBY/5/G7BmB1HbTGOl3eBOmWHrNgV5HDqBYiWl72KPfUPtKJYtBFrUoSq8IazEFKNMvAU 2+PiMF2vivaSkQgeDyIFewfLMpTggHJ11VYZJAbRBC6ylNj4PmR2Bp15Rmw9vRp/DSinJmkWf unKIO9Y+D2Skb0ZnjUWImbwTz9ZtXyTIHVpnbTjChdku8uI9+goh0VkajmQ8FLMci8vEuRT5n olXH+rOw+7vuGGW+kqQ00OjCeBzMfEsNOQJKC1lP1fscJTGNsq1W8ITwHpRapW8x4gC2JLJ6l Wcgfv3ZAk5lAzK+A9eU4o3CYYrzmh3yKJIYKYEL0OMR9RPdhuo= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 24 Oct 2017 19:21:24 +0200 Return the code "-EPROBE_DEFER" directly in one if branch without assigning it to the local variable "err" before. Signed-off-by: Markus Elfring --- drivers/gpu/drm/tegra/output.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c index 1e0915e213b4..a9b458f22de6 100644 --- a/drivers/gpu/drm/tegra/output.c +++ b/drivers/gpu/drm/tegra/output.c @@ -115,9 +115,8 @@ int tegra_output_probe(struct tegra_output *output) if (ddc) { output->ddc = of_find_i2c_adapter_by_node(ddc); if (!output->ddc) { - err = -EPROBE_DEFER; of_node_put(ddc); - return err; + return -EPROBE_DEFER; } of_node_put(ddc);