Commit 18de712a authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: slcan: clean up if/else

Remove braces after if() for single statement blocks, also remove else
after return() in if() block.

Link: https://lore.kernel.org/all/20220704125954.1587880-6-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 69a65396
......@@ -469,21 +469,21 @@ static void slcan_unesc(struct slcan *sl, unsigned char s)
{
if ((s == '\r') || (s == '\a')) { /* CR or BEL ends the pdu */
if (!test_and_clear_bit(SLF_ERROR, &sl->flags) &&
(sl->rcount > 4)) {
sl->rcount > 4)
slc_bump(sl);
}
sl->rcount = 0;
} else {
if (!test_bit(SLF_ERROR, &sl->flags)) {
if (sl->rcount < SLC_MTU) {
sl->rbuff[sl->rcount++] = s;
return;
} else {
}
sl->dev->stats.rx_over_errors++;
set_bit(SLF_ERROR, &sl->flags);
}
}
}
}
/*************************************************************************
......@@ -1104,9 +1104,8 @@ static void __exit slcan_exit(void)
continue;
sl = netdev_priv(dev);
if (sl->tty) {
if (sl->tty)
netdev_err(dev, "tty discipline still running\n");
}
slc_close(dev);
unregister_candev(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment