To avoid confusion, the linux kernel coding style discourage the use of one if-else branch with braces and another without braces.
Introduced-by: 65d8217193427026169c48112c561c5ca4d1bd18 ("batman-adv: compat: fix null pointer exception for kernels < 3.9")
Signed-off-by: Martin Hundebøll martin@hundeboll.net --- compat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/compat.h b/compat.h index 7beba36..0ceb2b1 100644 --- a/compat.h +++ b/compat.h @@ -167,8 +167,9 @@ static inline int batadv_param_set_copystring(const char *val, rcu_read_unlock(); \ dev_hold(dev); \ return dev; \ - } else \ - dev = NULL; + } else {\ + dev = NULL; \ + }
#endif /* < KERNEL_VERSION(2, 6, 36) */