summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2015-01-09 01:36:47 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2015-01-22 09:31:51 +0300
commitd3383aaae9800b9e13e25b71f70dff3814d10373 (patch)
treead491ae5dfe8b32f5a020bba6954df695fa51074 /drivers/misc
parentd83fb87b2e02ca34abf281c181682cbdfae23a80 (diff)
downloadlinux-d3383aaae9800b9e13e25b71f70dff3814d10373.tar.xz
cxl: remove redundant increment of hwirq
hwirq has not been initialized, however it is being incremented and also not being referenced in a loop. This error was detected with cppcheck: [drivers/misc/cxl/irq.c:439]: (error) Uninitialized variable: hwirq Commit 80fa93fce37d ("cxl: Name interrupts in /proc/interrupt") introduced this error. This is a simple fix that removes the redundant increment. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-By: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/cxl/irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index c294925f73ee..68ab608ecbe7 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -436,7 +436,7 @@ int afu_register_irqs(struct cxl_context *ctx, u32 count)
*/
INIT_LIST_HEAD(&ctx->irq_names);
for (r = 1; r < CXL_IRQ_RANGES; r++) {
- for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) {
+ for (i = 0; i < ctx->irqs.range[r]; i++) {
irq_name = kmalloc(sizeof(struct cxl_irq_name),
GFP_KERNEL);
if (!irq_name)