s5j/pwm: verify the result of pinmux control
authorHeesub Shin <heesub.shin@samsung.com>
Thu, 13 Jul 2017 06:28:01 +0000 (15:28 +0900)
committersunghan <sh924.chang@samsung.com>
Wed, 20 Sep 2017 05:46:34 +0000 (14:46 +0900)
Change-Id: I8ce31f4f16322077ab71360115a4f183ac7e1c7a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/s5j/s5j_pwm.c

index 8f11c1c..4d64565 100644 (file)
@@ -147,7 +147,9 @@ static int s5j_pwm_setup(FAR struct pwm_lowerhalf_s *dev)
 {
        FAR struct s5j_pwmtimer_s *priv = (FAR struct s5j_pwmtimer_s *)dev;
 
-       return s5j_configgpio(priv->pincfg);
+       VERIFY(s5j_configgpio(priv->pincfg) == OK);
+
+       return OK;
 }
 
 /****************************************************************************
@@ -245,7 +247,9 @@ static int s5j_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
        s5j_pwm_stop(dev);
 
        /* Then put the GPIO pins back to the default state */
-       return s5j_unconfiggpio(priv->pincfg);
+       VERIFY(s5j_unconfiggpio(priv->pincfg) == OK);
+
+       return OK;
 }
 
 /****************************************************************************