lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 3 Sep 2017 16:49:53 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Peter Meerwald-Stadler <pmeerw@...erw.net>
Cc:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: imu: inv_mpu6050: fix missing break in switch

On Wed, 23 Aug 2017 08:41:43 +0200 (CEST)
Peter Meerwald-Stadler <pmeerw@...erw.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@...eddedor.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;
> >   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ