mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
78cd4bf536
commit
149f3b8784
|
@ -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)
|
||||
(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)
|
||||
|
|
Loading…
Reference in New Issue