aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/pti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index be4857358d91..e74e7d266569 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -476,8 +476,10 @@ static int pti_tty_install(struct tty_driver *driver, struct tty_struct *tty)
476 else 476 else
477 pti_tty_data->mc = pti_request_masterchannel(2); 477 pti_tty_data->mc = pti_request_masterchannel(2);
478 478
479 if (pti_tty_data->mc == NULL) 479 if (pti_tty_data->mc == NULL) {
480 kfree(pti_tty_data);
480 return -ENXIO; 481 return -ENXIO;
482 }
481 tty->driver_data = pti_tty_data; 483 tty->driver_data = pti_tty_data;
482 } 484 }
483 485