mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 09:50:14 -05:00
iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able()
drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_preenable’: drivers/iio/proximity/sx9500.c:682: warning: ‘ret’ may be used uninitialized in this function drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_predisable’: drivers/iio/proximity/sx9500.c:706: warning: ‘ret’ may be used uninitialized in this function If active_scan_mask is empty, it will loop once more over all channels, doing nothing. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
c42b9e13f9
commit
06b00f99ca
1 changed files with 2 additions and 2 deletions
|
|
@ -682,7 +682,7 @@ out:
|
|||
static int sx9500_buffer_preenable(struct iio_dev *indio_dev)
|
||||
{
|
||||
struct sx9500_data *data = iio_priv(indio_dev);
|
||||
int ret, i;
|
||||
int ret = 0, i;
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
|
||||
|
|
@ -706,7 +706,7 @@ static int sx9500_buffer_preenable(struct iio_dev *indio_dev)
|
|||
static int sx9500_buffer_predisable(struct iio_dev *indio_dev)
|
||||
{
|
||||
struct sx9500_data *data = iio_priv(indio_dev);
|
||||
int ret, i;
|
||||
int ret = 0, i;
|
||||
|
||||
iio_triggered_buffer_predisable(indio_dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue