* Checkpatch miscomplaint about multi-arm if-statement
@ 2024-12-03 18:23 David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2024-12-03 18:23 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches; +Cc: dhowells, linux-kernel
Hi,
I'm seeing this:
WARNING: else is not generally useful after a break or return
#1220: FILE: net/rxrpc/sendmsg.c:301:
+ return -ENOMEM;
+ } else {
on:
if (call->send_queue) {
tq->qbase = call->send_top + 1;
call->send_queue->next = tq;
call->send_queue = tq;
} else if (WARN_ON(call->tx_queue)) {
kfree(tq);
return -ENOMEM;
} else {
tq->qbase = 0;
call->tx_qbase = 0;
call->send_queue = tq;
call->tx_qtail = tq;
call->tx_queue = tq;
}
but you cannot eliminate the last 'else' statement there.
David
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-03 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 18:23 Checkpatch miscomplaint about multi-arm if-statement David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox