diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-02-27 15:48:55 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-27 15:48:55 -0800 |
| commit | c37aa10c47d7d00356e7152ebd087de9c2cb7adc (patch) | |
| tree | b08677d182a18d4d19ceb856e219c2ca3ab7faf2 | |
| parent | c3eaa1a725dc304b4551ca70d986fe07c2708a32 (diff) | |
| parent | 40a11add8b4a6846a3ac53af5d8374ebc47591c8 (diff) | |
Merge "msm: adsprpc: perform NULL check"
| -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, |
