summaryrefslogtreecommitdiff
path: root/scripts/kconfig/expr.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-02-01 04:42:33 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-02-01 04:42:33 +0300
commitb19efcabb587e5470a423ef778905f47e5a47f1a (patch)
tree8863c2233ed8a30d55c4e4029a98c3d7faf359a8 /scripts/kconfig/expr.c
parent996d5d5f89a558a3608a46e73ccd1b99f1b1d058 (diff)
parentc5ccf2ad3d33413fee06ae87d0b970d8cc540db6 (diff)
downloadlinux-b19efcabb587e5470a423ef778905f47e5a47f1a.tar.xz
Merge branch 'next' into for-linus
Prepare input updates for 5.6 merge window.
Diffstat (limited to 'scripts/kconfig/expr.c')
-rw-r--r--scripts/kconfig/expr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 77ffff3a053c..9f1de58e9f0c 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -254,6 +254,13 @@ static int expr_eq(struct expr *e1, struct expr *e2)
{
int res, old_count;
+ /*
+ * A NULL expr is taken to be yes, but there's also a different way to
+ * represent yes. expr_is_yes() checks for either representation.
+ */
+ if (!e1 || !e2)
+ return expr_is_yes(e1) && expr_is_yes(e2);
+
if (e1->type != e2->type)
return 0;
switch (e1->type) {