diff options
| -rw-r--r-- | drivers/char/adsprpc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index b042a3d57de9..bd76abfa10ee 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2932,7 +2932,11 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) return err; snprintf(strpid, PID_SIZE, "%d", current->pid); buf_size = strlen(current->comm) + strlen("_") + strlen(strpid) + 1; - fl->debug_buf = kzalloc(buf_size, GFP_KERNEL); + VERIFY(err, NULL != (fl->debug_buf = kzalloc(buf_size, GFP_KERNEL))); + if (err) { + kfree(fl); + return err; + } snprintf(fl->debug_buf, UL_SIZE, "%.10s%s%d", current->comm, "_", current->pid); debugfs_file = debugfs_create_file(fl->debug_buf, 0644, |
