diff options
Diffstat (limited to 'drivers/misc/ti-st/tty_hci.c')
| -rw-r--r-- | drivers/misc/ti-st/tty_hci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/ti-st/tty_hci.c b/drivers/misc/ti-st/tty_hci.c index c5b147e68ae..7a312d39aea 100644 --- a/drivers/misc/ti-st/tty_hci.c +++ b/drivers/misc/ti-st/tty_hci.c @@ -142,6 +142,9 @@ int hci_tty_open(struct inode *inod, struct file *file) pr_info("inside %s (%p, %p)\n", __func__, inod, file); hst = kzalloc(sizeof(*hst), GFP_KERNEL); + if (!hst) + return -ENOMEM; + file->private_data = hst; hst = file->private_data; |