linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging:iio:gyro:adis16080: remove sparse warnings
@ 2012-06-12 20:25 Leed Aguilar
  2012-06-13  8:38 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Leed Aguilar @ 2012-06-12 20:25 UTC (permalink / raw)
  To: linux-iio; +Cc: leed.aguilar, Jonathan Cameron, Lars-Peter Clausen

Removed the following sparse warning:

In function 'adis16080_read_raw':
warning: 'ut' may be used uninitialized in this function

Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/gyro/adis16080_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c
index 11f1dcc..345e4fa 100644
--- a/drivers/staging/iio/gyro/adis16080_core.c
+++ b/drivers/staging/iio/gyro/adis16080_core.c
@@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev,
 			     long mask)
 {
 	int ret = -EINVAL;
-	u16 ut;
+	u16 ut = 0;
 	/* Take the iio_dev status lock */
 
 	mutex_lock(&indio_dev->mlock);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging:iio:gyro:adis16080: remove sparse warnings
  2012-06-12 20:25 [PATCH] staging:iio:gyro:adis16080: remove sparse warnings Leed Aguilar
@ 2012-06-13  8:38 ` Lars-Peter Clausen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2012-06-13  8:38 UTC (permalink / raw)
  To: Leed Aguilar; +Cc: linux-iio, Jonathan Cameron

On 06/12/2012 10:25 PM, Leed Aguilar wrote:
> Removed the following sparse warning:
> 
> In function 'adis16080_read_raw':
> warning: 'ut' may be used uninitialized in this function
> 
> Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks

>
> ---
>  drivers/staging/iio/gyro/adis16080_core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c
> index 11f1dcc..345e4fa 100644
> --- a/drivers/staging/iio/gyro/adis16080_core.c
> +++ b/drivers/staging/iio/gyro/adis16080_core.c
> @@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev,
>  			     long mask)
>  {
>  	int ret = -EINVAL;
> -	u16 ut;
> +	u16 ut = 0;
>  	/* Take the iio_dev status lock */
>  
>  	mutex_lock(&indio_dev->mlock);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-13  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 20:25 [PATCH] staging:iio:gyro:adis16080: remove sparse warnings Leed Aguilar
2012-06-13  8:38 ` Lars-Peter Clausen

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).