aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/line.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index ac9bcfbbeee1..08c5fba6db84 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -640,14 +640,11 @@ int line_id(char **str, int *start_out, int *end_out)
640 640
641int line_remove(struct line *lines, unsigned int num, int n, char **error_out) 641int line_remove(struct line *lines, unsigned int num, int n, char **error_out)
642{ 642{
643 int err; 643 if (n >= num) {
644 char config[sizeof("conxxxx=none\0")]; 644 *error_out = "Device number out of range";
645 645 return -EINVAL;
646 sprintf(config, "%d=none", n); 646 }
647 err = line_setup(lines, num, config, error_out); 647 return setup_one_line(lines, n, "none", INIT_ONE, error_out);
648 if (err >= 0)
649 err = 0;
650 return err;
651} 648}
652 649
653struct tty_driver *register_lines(struct line_driver *line_driver, 650struct tty_driver *register_lines(struct line_driver *line_driver,