diff --git a/components/finsh/shell.c b/components/finsh/shell.c index a9559954e69052586f55533daaab0375c9474914..00553864e3674de69fae0ae119bdbcf954220a9f 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -118,7 +118,7 @@ void finsh_set_device(const char* device_name) { /* close old finsh device */ rt_device_close(shell->device); - rt_device_set_rx_indicate(dev, RT_NULL); + rt_device_set_rx_indicate(shell->device, RT_NULL); } shell->device = dev;