summaryrefslogtreecommitdiff
path: root/include/linux/fwnode.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-23 23:32:27 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-08-26 11:40:24 +0200
commit149f3b87840e7d292ad059f5fc23f1fa2fc98b9e (patch)
tree3044fecf00274e396d3aff05a1c831be788ce542 /include/linux/fwnode.h
parent78cd4bf53635d3aeb73435bc89eb6eb39450f315 (diff)
device property: Remove duplicate test for NULL
There is no need to check twice for a NULL in fwnode_call_bool_op(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/fwnode.h')
-rw-r--r--include/linux/fwnode.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index a11c8c56c78b..ababd6bc82f3 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -110,10 +110,11 @@ struct fwnode_operations {
(fwnode ? (fwnode_has_op(fwnode, op) ? \
(fwnode)->ops->op(fwnode, ## __VA_ARGS__) : -ENXIO) : \
-EINVAL)
-#define fwnode_call_bool_op(fwnode, op, ...) \
- (fwnode ? (fwnode_has_op(fwnode, op) ? \
- (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) : \
- false)
+
+#define fwnode_call_bool_op(fwnode, op, ...) \
+ (fwnode_has_op(fwnode, op) ? \
+ (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
+
#define fwnode_call_ptr_op(fwnode, op, ...) \
(fwnode_has_op(fwnode, op) ? \
(fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)