diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2011-02-24 16:34:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-28 14:40:24 -0800 |
commit | fc7f95a94606fd81d8a3910c1477ea7340b52b9f (patch) | |
tree | 0dc23e6977b57257346e0b50ee6e2f74cd7165e1 /drivers/staging/iio/Documentation/iio_utils.h | |
parent | 7ccd4506fa49600a3c59cf64608b2c9e669b6c97 (diff) | |
download | kernel_samsung_crespo-fc7f95a94606fd81d8a3910c1477ea7340b52b9f.zip kernel_samsung_crespo-fc7f95a94606fd81d8a3910c1477ea7340b52b9f.tar.gz kernel_samsung_crespo-fc7f95a94606fd81d8a3910c1477ea7340b52b9f.tar.bz2 |
IIO: Documentation: iio_utils: fix mask generation
Variable sizeint is used uninitialized.
Remove sizeint completely and use bits_used instead.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/Documentation/iio_utils.h')
-rw-r--r-- | drivers/staging/iio/Documentation/iio_utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index bde2313..1b33c04 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -113,7 +113,7 @@ inline int iioutils_get_type(unsigned *is_signed, DIR *dp; char *scan_el_dir, *builtname, *builtname_generic, *filename = 0; char signchar; - unsigned sizeint, padint; + unsigned padint; const struct dirent *ent; ret = asprintf(&scan_el_dir, FORMAT_SCAN_ELEMENTS_DIR, device_dir); @@ -159,7 +159,7 @@ inline int iioutils_get_type(unsigned *is_signed, fscanf(sysfsfp, "%c%u/%u", &signchar, bits_used, &padint); *bytes = padint / 8; - if (sizeint == 64) + if (*bits_used == 64) *mask = ~0; else *mask = (1 << *bits_used) - 1; |