aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fwserial
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2012-11-27 21:37:12 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-28 08:46:52 -0800
commit49b2746e1426ffa188421996a0323bdd47657108 (patch)
tree0e0aad3007ab701d763e74cbe2cc980db64aed76 /drivers/staging/fwserial
parenta321846492f9ce3bab27f826e6579217fbc35732 (diff)
staging/fwserial: Use WARN_ONCE when port table is corrupted
Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fwserial')
-rw-r--r--drivers/staging/fwserial/fwserial.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 99a2d2dbd322..0681967337f9 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -939,14 +939,9 @@ static void fwserial_destroy(struct kref *kref)
mutex_lock(&port_table_lock);
for (j = 0; j < num_ports; ++i, ++j) {
- static bool once;
- int corrupt = port_table[i] != ports[j];
- if (corrupt && !once) {
- WARN(corrupt, "port_table[%d]: %p != ports[%d]: %p",
- i, port_table[i], j, ports[j]);
- once = true;
- port_table_corrupt = true;
- }
+ port_table_corrupt |= port_table[i] != ports[j];
+ WARN_ONCE(port_table_corrupt, "port_table[%d]: %p != ports[%d]: %p",
+ i, port_table[i], j, ports[j]);
port_table[i] = NULL;
}

Privacy Policy