if (!elm)
return;
+ spin_lock_bh(&elm->lock);
+ if (elm->hw_failure) {
+ spin_unlock_bh(&elm->lock);
+
+ put_elm(elm);
+ return;
+ }
+
/* Read the characters out of the buffer */
while (count-- && elm->rxfill < sizeof(elm->rxbuf)) {
if (fp && *fp++) {
if (count >= 0) {
netdev_err(elm->dev, "Receive buffer overflowed. Bad chip or wiring?");
- spin_lock_bh(&elm->lock);
elm327_hw_failure(elm);
spin_unlock_bh(&elm->lock);
return;
}
- spin_lock_bh(&elm->lock);
elm327_parse_rxbuf(elm);
spin_unlock_bh(&elm->lock);