From eee6c89bfba9fbe0904a747c88023fb5dcee8ef6 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Wed, 14 Nov 2018 06:31:37 -0600 Subject: [PATCH] drivers/input/button_upper.c: Fix two bad NULL checks --- drivers/input/button_upper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index b60e77f60d..f15c592e21 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -198,7 +198,7 @@ static inline int btn_takesem(sem_t *sem) #if !defined(CONFIG_DISABLE_POLL) || !defined(CONFIG_DISABLE_SIGNALS) static void btn_enable(FAR struct btn_upperhalf_s *priv) { - FAR const struct btn_lowerhalf_s *lower = priv->bu_lower; + FAR const struct btn_lowerhalf_s *lower; FAR struct btn_open_s *opriv; btn_buttonset_t press; btn_buttonset_t release; @@ -280,7 +280,7 @@ static void btn_interrupt(FAR const struct btn_lowerhalf_s *lower, static void btn_sample(FAR struct btn_upperhalf_s *priv) { - FAR const struct btn_lowerhalf_s *lower = priv->bu_lower; + FAR const struct btn_lowerhalf_s *lower; FAR struct btn_open_s *opriv; btn_buttonset_t sample; #if !defined(CONFIG_DISABLE_POLL) || !defined(CONFIG_DISABLE_SIGNALS)