summaryrefslogtreecommitdiff
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorCristina Opriceana <cristina.opriceana@gmail.com>2015-03-31 13:03:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-01 18:23:20 +0300
commite84d0724101ba8a38afab21c118135815f707733 (patch)
tree114d11c51681969932e9fbb4a142f8230e0f5f63 /drivers/staging/iio
parent45297571e90bd59195011ae8e328dae84534ecef (diff)
downloadlinux-e84d0724101ba8a38afab21c118135815f707733.tar.xz
Staging: iio: trigger: Remove explicit NULL comparison
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>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/trigger/iio-trig-periodic-rtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
index 89df1d32874d..0c1976ddee74 100644
--- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
+++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
@@ -124,7 +124,7 @@ static int iio_trig_periodic_rtc_probe(struct platform_device *dev)
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) {
@@ -142,7 +142,7 @@ static int iio_trig_periodic_rtc_probe(struct platform_device *dev)
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;
}