linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_mpu6050: fix missing break in switch
Date: Sun, 3 Sep 2017 16:49:53 +0100	[thread overview]
Message-ID: <20170903164953.68459334@archlinux> (raw)
In-Reply-To: <alpine.DEB.2.20.1708230841050.6913@vps.pmeerw.net>

On Wed, 23 Aug 2017 08:41:43 +0200 (CEST)
Peter Meerwald-Stadler <pmeerw@pmeerw.net> wrote:

> > Add missing break statement to prevent the code for case
> > IIO_CHAN_INFO_CALIBBIAS falling through to the default case.
> > 
> > Also, add a break to the default case for the switch within
> > case IIO_CHAN_INFO_CALIBBIAS.  
> 
> fix seems to be cosmetic only...
> 
> > Addresses-Coverity-ID: 1357377
> > Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Indeed only cosmetic, but if it makes static analysis more productive
by removing a trivial case, it is worth having.

Applied to the togreg branch of iio.git - will be pushed out as testing
just as soon as I catch up with my backlog.

Jonathan

> > ---
> > This issue was reported by Coverity and it was tested by compilation only.
> > Please, verify if this is an actual bug.
> > 
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> > index 44830bc..6d2268a 100644
> > --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> > +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> > @@ -542,7 +542,9 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
> >  			break;
> >  		default:
> >  			result = -EINVAL;
> > +			break;
> >  		}
> > +		break;
> >  	default:
> >  		result = -EINVAL;
> >  		break;
> >   
> 


      reply	other threads:[~2017-09-03 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 19:13 [PATCH] iio: imu: inv_mpu6050: fix missing break in switch Gustavo A. R. Silva
2017-08-23  6:41 ` Peter Meerwald-Stadler
2017-09-03 15:49   ` Jonathan Cameron [this message]

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=20170903164953.68459334@archlinux \
    --to=jic23@kernel.org \
    --cc=gustavo@embeddedor.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).