diff options
| author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-31 06:03:12 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-01 11:23:20 -0400 |
| commit | e84d0724101ba8a38afab21c118135815f707733 (patch) | |
| tree | 114d11c51681969932e9fbb4a142f8230e0f5f63 | |
| parent | 45297571e90bd59195011ae8e328dae84534ecef (diff) | |
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>
| -rw-r--r-- | drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 4 |
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) | |||
| 124 | int i, ret; | 124 | int i, ret; |
| 125 | 125 | ||
| 126 | for (i = 0;; i++) { | 126 | for (i = 0;; i++) { |
| 127 | if (pdata[i] == NULL) | 127 | if (!pdata[i]) |
| 128 | break; | 128 | break; |
| 129 | trig = iio_trigger_alloc("periodic%s", pdata[i]); | 129 | trig = iio_trigger_alloc("periodic%s", pdata[i]); |
| 130 | if (!trig) { | 130 | if (!trig) { |
| @@ -142,7 +142,7 @@ static int iio_trig_periodic_rtc_probe(struct platform_device *dev) | |||
| 142 | trig->ops = &iio_prtc_trigger_ops; | 142 | trig->ops = &iio_prtc_trigger_ops; |
| 143 | /* RTC access */ | 143 | /* RTC access */ |
| 144 | trig_info->rtc = rtc_class_open(pdata[i]); | 144 | trig_info->rtc = rtc_class_open(pdata[i]); |
| 145 | if (trig_info->rtc == NULL) { | 145 | if (!trig_info->rtc) { |
| 146 | ret = -EINVAL; | 146 | ret = -EINVAL; |
| 147 | goto error_free_trig_info; | 147 | goto error_free_trig_info; |
| 148 | } | 148 | } |
