Browse Source

Update pwm.c

David Lin 5 years ago
parent
commit
d38dbcaaa3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bsp/fh8620/drivers/pwm.c

+ 1 - 1
bsp/fh8620/drivers/pwm.c

@@ -186,7 +186,7 @@ int fh_pwm_probe(void *priv_data)
 
     PWM_Enable(pwm_obj, RT_FALSE);
 
-    pwm_dev = rt_calloc(sizeof(struct rt_device));
+    pwm_dev = rt_calloc(1,sizeof(struct rt_device));
 
     if (pwm_dev == RT_NULL)
     {