aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/chan_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/chan_kern.c')
-rw-r--r--arch/um/drivers/chan_kern.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 3a95498155a1..390920d63a24 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -547,6 +547,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
547 char *in, *out; 547 char *in, *out;
548 548
549 if (!list_empty(chans)) { 549 if (!list_empty(chans)) {
550 line->chan_in = line->chan_out = NULL;
550 free_chan(chans); 551 free_chan(chans);
551 INIT_LIST_HEAD(chans); 552 INIT_LIST_HEAD(chans);
552 } 553 }
@@ -565,6 +566,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
565 566
566 new->input = 1; 567 new->input = 1;
567 list_add(&new->list, chans); 568 list_add(&new->list, chans);
569 line->chan_in = new;
568 570
569 new = parse_chan(line, out, device, opts, error_out); 571 new = parse_chan(line, out, device, opts, error_out);
570 if (new == NULL) 572 if (new == NULL)
@@ -572,6 +574,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
572 574
573 list_add(&new->list, chans); 575 list_add(&new->list, chans);
574 new->output = 1; 576 new->output = 1;
577 line->chan_out = new;
575 } 578 }
576 else { 579 else {
577 new = parse_chan(line, str, device, opts, error_out); 580 new = parse_chan(line, str, device, opts, error_out);
@@ -581,6 +584,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
581 list_add(&new->list, chans); 584 list_add(&new->list, chans);
582 new->input = 1; 585 new->input = 1;
583 new->output = 1; 586 new->output = 1;
587 line->chan_in = line->chan_out = new;
584 } 588 }
585 return 0; 589 return 0;
586} 590}