[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5685A273.6070607@users.sourceforge.net>
Date: Thu, 31 Dec 2015 22:47:31 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Robert Richter <rric@...nel.org>,
Sunil Goutham <sgoutham@...ium.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] net-thunder: One check less in nicvf_register_interrupts()
after error detection
From: Markus Elfring <elfring@...rs.sourceforge.net>
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 <elfring@...rs.sourceforge.net>
---
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists