public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/core: fix incorrect fall-through on switch statement
Date: Wed, 13 Sep 2017 19:49:17 +0300	[thread overview]
Message-ID: <20170913164917.GU3405@mtr-leonro.local> (raw)
In-Reply-To: <20170911160313.28240-1-colin.king@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

On Mon, Sep 11, 2017 at 05:03:13PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where mbox_status is OCRDMA_MBX_STATUS_FAILED and
> add_status is OCRDMA_MBX_STATUS_FAILED err_num is assigned -EAGAIN
> however the case OCRDMA_MBX_STATUS_FAILED is missing a break and
> falls through to the default case which then re-assigns err_num
> to -EFAULT.   Fix this so that err_num is assigned to -EAGAIN
> for the add_status OCRDMA_MBX_STATUS_FAILED case and -EFAULT
> otherwise.
>
> Detected by CoverityScan CID#703125 ("Missing break in switch")
>
> Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Except the wrong title: IB/core -> IB/ocrdma

Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-09-13 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 16:03 [PATCH] IB/core: fix incorrect fall-through on switch statement Colin King
2017-09-13 16:49 ` Leon Romanovsky [this message]
     [not found]   ` <20170913164917.GU3405-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-22 17:16     ` Doug Ledford

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=20170913164917.GU3405@mtr-leonro.local \
    --to=leon@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox