Commit ac1640fb authored by Cristina Moraru's avatar Cristina Moraru Committed by Greg Kroah-Hartman

staging: iio: trigger: Remove explicit comparisons

Remove comparisons to 0 or NULL
Signed-off-by: default avatarCristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 97deb1bc
......@@ -100,7 +100,7 @@ static ssize_t iio_bfin_tmr_frequency_store(struct device *dev,
if (enabled)
disable_gptimers(st->t->bit);
if (val == 0)
if (!val)
return count;
val = get_sclk() / val;
......@@ -125,7 +125,7 @@ static ssize_t iio_bfin_tmr_frequency_show(struct device *dev,
unsigned int period = get_gptimer_period(st->t->id);
unsigned long val;
if (period == 0)
if (!period)
val = 0;
else
val = get_sclk() / get_gptimer_period(st->t->id);
......
......@@ -39,7 +39,7 @@ static int iio_trig_periodic_rtc_set_state(struct iio_trigger *trig, bool state)
dev_dbg(&trig_info->rtc->dev, "trigger frequency is %u\n",
trig_info->frequency);
ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, state);
if (ret == 0)
if (!ret)
trig_info->state = state;
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment