summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2024-02-23 07:39:30 -0600
committerPaolo Abeni <pabeni@redhat.com>2024-02-27 11:24:04 +0100
commitf9345952e74a77ba905b5a23252bffde48162ef3 (patch)
tree87dc5b4f1a34169664f596671e5b8f3e7f1bba86 /drivers
parent423df2e09d3b893ce83bc35ca81657829604968e (diff)
downloadlinux-f9345952e74a77ba905b5a23252bffde48162ef3.tar.gz
linux-f9345952e74a77ba905b5a23252bffde48162ef3.tar.bz2
linux-f9345952e74a77ba905b5a23252bffde48162ef3.zip
net: ipa: don't bother zeroing an already zero register
In ipa_interrupt_suspend_clear_all(), if the SUSPEND_INFO register read contains no set bits, there's no interrupt condition to clear. Skip the write to the clear register in that case. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ipa/ipa_interrupt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
index 501962cc4e90..4d80bf77a532 100644
--- a/drivers/net/ipa/ipa_interrupt.c
+++ b/drivers/net/ipa/ipa_interrupt.c
@@ -59,7 +59,7 @@ static void ipa_interrupt_suspend_clear_all(struct ipa_interrupt *interrupt)
val = ioread32(ipa->reg_virt + reg_n_offset(reg, unit));
/* SUSPEND interrupt status isn't cleared on IPA version 3.0 */
- if (ipa->version == IPA_VERSION_3_0)
+ if (!val || ipa->version == IPA_VERSION_3_0)
continue;
reg = ipa_reg(ipa, IRQ_SUSPEND_CLR);