From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: parav.pandit@emulex.com, roland@purestorage.com
Subject: ocrdma: missing break in switch statement.
Date: Wed, 29 Jan 2014 11:22:11 -0500 [thread overview]
Message-ID: <20140129162211.GA16149@redhat.com> (raw)
I've been going through the 'missing break' warnings in coverity, and there's a bunch
in infiniband. A lot look intentional, but this one can't be right.
We set a variable, and then immediately overwrite it.
instead of adding break spaghetti, just return the correct value.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 1664d648cbfc..b45b7f8d9103 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -234,9 +234,9 @@ static int ocrdma_get_mbx_errno(u32 status)
case OCRDMA_MBX_STATUS_FAILED:
switch (add_status) {
case OCRDMA_MBX_ADDI_STATUS_INSUFFICIENT_RESOURCES:
- err_num = -EAGAIN;
- break;
+ return -EAGAIN;
}
+
default:
err_num = -EFAULT;
}
reply other threads:[~2014-01-29 16:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140129162211.GA16149@redhat.com \
--to=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=parav.pandit@emulex.com \
--cc=roland@purestorage.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.