diff --git a/src/kservice.c b/src/kservice.c index 0e15610e51..f18f792dda 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1073,8 +1073,8 @@ rt_device_t rt_console_set_device(const char *name) } /* set new console device */ + rt_device_open(new, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM); _console_device = new; - rt_device_open(_console_device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM); } return old;