Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254709

[PATCH] iio: core: fix ptr_ret.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] iio: core: fix ptr_ret.cocci warnings
Date 2015-10-23 18:50 +0200
Message-ID <qmNHt-762-19@gated-at.bofh.it> (permalink)
References <qmNHs-762-1@gated-at.bofh.it> <qmMBI-5ya-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


drivers/iio/industrialio-sw-trigger.c:169:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 industrialio-sw-trigger.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/iio/industrialio-sw-trigger.c
+++ b/drivers/iio/industrialio-sw-trigger.c
@@ -166,9 +166,7 @@ static int __init iio_sw_trigger_init(vo
 		configfs_register_default_group(&iio_configfs_subsys.su_group,
 						"triggers",
 						&iio_triggers_group_type);
-	if (IS_ERR(iio_triggers_group))
-		return PTR_ERR(iio_triggers_group);
-	return 0;
+	return PTR_ERR_OR_ZERO(iio_triggers_group);
 }
 module_init(iio_sw_trigger_init);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v10 3/5] iio: core: Introduce IIO software triggers Daniel Baluta <daniel.baluta@intel.com> - 2015-10-23 17:40 +0200
  Re: [PATCH v10 3/5] iio: core: Introduce IIO software triggers kbuild test robot <lkp@intel.com> - 2015-10-23 18:50 +0200
  [PATCH] iio: core: fix ptr_ret.cocci warnings kbuild test robot <lkp@intel.com> - 2015-10-23 18:50 +0200

csiph-web