From patchwork Sat Dec 31 22:01:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9492805 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 B9F3A62ABB for ; Sat, 31 Dec 2016 22:03:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9B771FF35 for ; Sat, 31 Dec 2016 22:03:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C3EC2094F; Sat, 31 Dec 2016 22:03:43 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42BE11FF35 for ; Sat, 31 Dec 2016 22:03:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cNRjF-0000yw-9T; Sat, 31 Dec 2016 22:02:17 +0000 Received: from mout.web.de ([212.227.15.4]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cNRj9-0000vW-CB; Sat, 31 Dec 2016 22:02:12 +0000 Received: from [192.168.1.2] ([77.182.161.10]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MgfH5-1cCGFg0Tep-00Nzkc; Sat, 31 Dec 2016 23:01:31 +0100 Subject: [PATCH 3/6] staging: vchiq_arm: One check less in dump_phys_mem() after error detection To: devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, kbuild test robot , popcornmix@gmail.com, Eric Anholt , Greg Kroah-Hartman , Lee Jones , Stefan Wahren , Stephen Warren , Wei Yongjun References: <5acd65e7-0b5d-0972-5e1a-6e87d71dc1a4@users.sourceforge.net> From: SF Markus Elfring Message-ID: <7b97ce90-64c9-7327-9e03-1e22bf7d7f53@users.sourceforge.net> Date: Sat, 31 Dec 2016 23:01:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <5acd65e7-0b5d-0972-5e1a-6e87d71dc1a4@users.sourceforge.net> X-Provags-ID: V03:K0:8zMI8txzRc342YqHTKtcQIUDBWqVvmINnCsz0TrCkKbILtTlXqD e+Gw8RyEUUchf90iH6jGZP3/YCym237Kwa4XkJhET0FtdXjDiJEZXrgM+tPZmcJ5fVmhB/y hM5JpXUj8xUrRK5h7a+Xd3O350Fte4wFXXo9ZcdEtmJXC0QFBdVmx9nLvqAJDbwJsy03QMT ytKyMG2LX9n/9rgPT6tLw== X-UI-Out-Filterresults: notjunk:1; V01:K0:SnYyrXYh7pE=:3g/gzMyH3m7xfBicThuzvQ onwOZ4UOfX9oEsXCdCxLoMxWQYJOu5mnpjwTzX8193ljOcV1aeQzPWSrpuf3jQQQezB5Pa7c1 aLjprZyuvZ6pg0yt01i738gZZZpMZ/L4PUCwX5oKgKz5j2yiDFyfxhcRCA5BEfWtwmFyUXHr3 a6es9IQJtc1Nsotjpvqqc8wGnBWlQYIeQdO9If+No0tENWWZ71M3eBx5NhCuXF6nIBMQRohZR iTK+Pnye3cSeL+0sHXZfZ0S0BlD1qwJzQ40i9UEbg5lyRCczAurJ/MZ/+a/xTn3l8PmWyxk5h iW3xaMgMYO6pCU6iqZ+o6VCTKJQ3GjRAInRe2B5BEA7SgvoR/o2Ets02dnfJdNwXDBigK8cJZ +yIZp9hBFaFR/E6m7QiEZY02ombKNigyi3NZ2t+O48oeBN3R3Jm5f1+oN0N6B0p1skikkKmb7 8HG9PjVEqYtWr67PnQ7pjVfHsD3MF7za6eUaR/PQblEnt6jRg3lCW0zh5dK03dYB10nBwEBhY G53AzVEIplF6dK89YKDmRDkVtF6oz78PeMhVaJWUR1H5rGFvWgwHF//uamT5nzJMGXw+ga/AF 8bkh8VZ5I2/+fLnlG5f5tZxnqWnpptfkr7hWjZRzc2dSwEBh9G3H+6IyqcGcLsaYu3pkZpSGf wq60mwvNmvw0u7RJSxngdljvc7s1mahhvTmiFaJxXKHmG9c/es38NshHQOmAUxt5yPNmv5y0X 6kBu8Jh2sX79BcUA1DCD2hAImakzA8GayKewIqgtN+oUp1MUBuNmS9pHjFyp85roIQxUyD4r0 v26KCrX X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161231_140211_739397_BE6FE359 X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML 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 From: Markus Elfring Date: Sat, 31 Dec 2016 21:26:09 +0100 Adjust a jump target according to the Linux coding style convention so that a redundant check for a null pointer can be avoided in this function. Signed-off-by: Markus Elfring --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 2a260034189d..a316cf9ac626 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1581,7 +1581,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) if (rc < 0) { vchiq_log_error(vchiq_arm_log_level, "Failed to get user pages: %d\n", rc); - goto out; + goto put_pages; } while (offset < end_offset) { @@ -1607,10 +1607,9 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) offset += 16; } -out: if (page) kunmap(page); - +put_pages: for (page_idx = 0; page_idx < num_pages; page_idx++) put_page(pages[page_idx]);