On Friday, August 23, 2019 10:32:27 PM CEST Andy Shevchenko wrote: > There is no need to check twice for a NULL in fwnode_call_bool_op(). > > Cc: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > include/linux/fwnode.h | 9 +++++---- > 1 file 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) > Applied, thanks!