Skip to content

Commit 84b5b2f

Browse files
CYFS3Rbb666
authored andcommitted
fix:pwm msh err
1 parent fbb6519 commit 84b5b2f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/drivers/misc/rt_drv_pwm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,12 @@ static int pwm_list(int argc, char **argv)
331331
pwm_device = (struct rt_device_pwm *)rt_device_find(argv[2]);
332332
result_str = (pwm_device == RT_NULL) ? "failure" : "success";
333333
rt_kprintf("probe %s %s\n", argv[2], result_str);
334+
return (pwm_device == RT_NULL) ? -RT_ERROR : RT_EOK;
334335
}
335336
else
336337
{
337338
rt_kprintf("pwm probe <device name> - probe pwm by name\n");
339+
return -RT_EINVAL;
338340
}
339341
}
340342
else if (pwm_device == RT_NULL)

0 commit comments

Comments
 (0)