This patch removes explicit NULL comparison and replaces it
with its shorter form. Detected with coccinelle.
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int i, ret;
for (i = 0;; i++) {
- if (pdata[i] == NULL)
+ if (!pdata[i])
break;
trig = iio_trigger_alloc("periodic%s", pdata[i]);
if (!trig) {
trig->ops = &iio_prtc_trigger_ops;
/* RTC access */
trig_info->rtc = rtc_class_open(pdata[i]);
- if (trig_info->rtc == NULL) {
+ if (!trig_info->rtc) {
ret = -EINVAL;
goto error_free_trig_info;
}