Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbbLaVsM (ORCPT ); Thu, 31 Dec 2015 16:48:12 -0500 Received: from mout.web.de ([212.227.17.12]:59269 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbbLaVsI (ORCPT ); Thu, 31 Dec 2015 16:48:08 -0500 Subject: [PATCH] net-thunder: One check less in nicvf_register_interrupts() after error detection References: <566ABCD9.1060404@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall To: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Robert Richter , Sunil Goutham From: SF Markus Elfring Message-ID: <5685A273.6070607@users.sourceforge.net> Date: Thu, 31 Dec 2015 22:47:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <566ABCD9.1060404@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:36I3YoDNgQ9yuaUt2hHHphG+R3XGg/jpVocbufK0Oecb88a7Ewx VSYo3AVwFxuaD5nQBPT8R5zTfNy4TKwfouBF3WBkuT5uEIxowI+fD9sk9+ddKaHUBNlrddC yfxdF1XYWIGWuLZOc0YiUPvrc7BOP/GFMCq/WuWIxdLWrmDodowTc2pQ4OXZlHi4kH6vL0L pVaAwoc6J5m4kip7CJ4Gg== X-UI-Out-Filterresults: notjunk:1;V01:K0:1RR8DybkYM0=:NEIQRrZcQwoLnUGL7dF6kg SvkobH7mZQ/nsnmSSTsTrzO1ruM0OZXxMvolmhr63lGPjoOGyPSK9KGa0/Z7/2yaHFat3C8eI nzWR4lCA+HZVvJSbLuB1eavneWGGHgz4QfSAYpuJz1v0nNPlTamanqoIT9Qb27GhvgaykLwLI ax5IFGnaCu7+oK7IKc2VfFf4mrNnbkVAb6n84jYDOufSp0UshuOXtoycIyq8Da6pSudidFe4b kj3lZUH7SwdUavbNz+QfX0shZVUlmMnkXBT2TnpVuob2fsPj+Mcg10F2e30Bdxlj5Rq0pBUfL k4mIRHIeP6iey7NUjG8fzaStEXdZAoy4HcdjsP3cimP9gpADalvzSkOORLxD5WHHfpwCLIJ8g SccSxD7O8+Y5+WwhzfJZa9Hv7QDZHIIt6/AXVKSBAXbaFjXltlI+XzQKO2NrC1G9DgabAXMOd JEL7qLFpw6IYr0/V4kL0oZEAKIuOUr5Fr1fLrCtIruODsMWoH7z3bBL3QdlLh/N52AAjKqgIi GWep2642IWVk/RLPy9xx4uNSA8fUP+N8fKWHyi+PU7xuEn/HXaV5qvllNS0KyY5y8Fter3O8G jWJLjICukBrh1VHaHYCZxRdroVRDvFxFpqeeR7ucUcMmGI6prL2wMIzcV2xg9PWeT5QXE24xM XTF5WSjQ/MCkfxzaGbmwWZGLD4nHTIFjr9JdGgtS1Ordr2KYGG5Vs7Ktm5y0DYi+1RtYCPNyc Qk1pMMTfCPdltIzttoAg9U8E3e9EuqFvW3fecSUWTrLW9H/Dbco1xYIgoOupayePS55b0FxlV J6JiPT8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1896 Lines: 60 From: Markus Elfring Date: Thu, 31 Dec 2015 22:40:39 +0100 Adjust a jump target to eliminate a check before error logging. Use the identifier "report_failure" instead of "err". Signed-off-by: Markus Elfring --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index c24cb2a..21e1579 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -922,7 +922,7 @@ static int nicvf_register_interrupts(struct nicvf *nic) ret = request_irq(vector, nicvf_intr_handler, 0, nic->irq_name[irq], nic->napi[irq]); if (ret) - goto err; + goto report_failure; nic->irq_allocated[irq] = true; } @@ -933,7 +933,7 @@ static int nicvf_register_interrupts(struct nicvf *nic) ret = request_irq(vector, nicvf_rbdr_intr_handler, 0, nic->irq_name[irq], nic); if (ret) - goto err; + goto report_failure; nic->irq_allocated[irq] = true; } @@ -944,13 +944,12 @@ static int nicvf_register_interrupts(struct nicvf *nic) ret = request_irq(nic->msix_entries[irq].vector, nicvf_qs_err_intr_handler, 0, nic->irq_name[irq], nic); - if (!ret) + if (!ret) { nic->irq_allocated[irq] = true; - -err: - if (ret) - netdev_err(nic->netdev, "request_irq failed, vector %d\n", irq); - + return 0; + } +report_failure: + netdev_err(nic->netdev, "request_irq failed, vector %d\n", irq); return ret; } -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/