Skip to content

Commit

Permalink
EDAC, qcom_edac: Remove irq_handled local variable
Browse files Browse the repository at this point in the history
irq_handled isn't initialized to false on function entry. However, it is
not really needed and the IRQ handler return value can be set directly
instead.

 [ bp: rewrite commit message. ]

Fixes: 2745065 ("drivers: edac: Add EDAC driver support for QCOM SoCs")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
CC: Channagoud Kadabi <[email protected]>
CC: Mauro Carvalho Chehab <[email protected]>
CC: Venkata Narendra Kumar Gutta <[email protected]>
CC: [email protected]
CC: [email protected]
CC: linux-edac <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
  • Loading branch information
Dan Carpenter authored and suryasaimadhu committed Nov 6, 2018
1 parent 1a81361 commit 8fd8cbf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/edac/qcom_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
struct llcc_drv_data *drv = edac_dev_ctl->pvt_info;
irqreturn_t irq_rc = IRQ_NONE;
u32 drp_error, trp_error, i;
bool irq_handled;
int ret;

/* Iterate over the banks and look for Tag RAM or Data RAM errors */
Expand All @@ -311,7 +310,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
ret = dump_syn_reg(edev_ctl, LLCC_DRAM_UE, i);
}
if (!ret)
irq_handled = true;
irq_rc = IRQ_HANDLED;

ret = regmap_read(drv->regmap,
drv->offsets[i] + TRP_INTERRUPT_0_STATUS,
Expand All @@ -327,12 +326,9 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
ret = dump_syn_reg(edev_ctl, LLCC_TRAM_UE, i);
}
if (!ret)
irq_handled = true;
irq_rc = IRQ_HANDLED;
}

if (irq_handled)
irq_rc = IRQ_HANDLED;

return irq_rc;
}

Expand Down

0 comments on commit 8fd8cbf

Please sign in to comment.