diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-04-18 04:50:56 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-18 04:50:55 -0700 |
| commit | 315e769672e721d4702be86aff44caa4abc4788e (patch) | |
| tree | 783ae1e9fb46f2076c70c39920464da8c936003e | |
| parent | 1b5da171e898c6878130856c89c567f65d2ffd82 (diff) | |
| parent | 2db9527657ab1dd04ff7a3bfc052bfd325aadf02 (diff) | |
Merge "voice_svc: Avoid double free in voice_svc driver"
| -rw-r--r-- | drivers/soc/qcom/qdsp6v2/voice_svc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/soc/qcom/qdsp6v2/voice_svc.c b/drivers/soc/qcom/qdsp6v2/voice_svc.c index c560ec7d7401..f01ab2499a75 100644 --- a/drivers/soc/qcom/qdsp6v2/voice_svc.c +++ b/drivers/soc/qcom/qdsp6v2/voice_svc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2018, 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 @@ -773,7 +773,7 @@ static int voice_svc_probe(struct platform_device *pdev) if (ret) { pr_err("%s: Failed to alloc chrdev\n", __func__); ret = -ENODEV; - goto chrdev_err; + goto done; } voice_svc_dev->major = MAJOR(device_num); @@ -820,8 +820,6 @@ dev_err: class_destroy(voice_svc_class); class_err: unregister_chrdev_region(0, MINOR_NUMBER); -chrdev_err: - kfree(voice_svc_dev); done: return ret; } @@ -835,7 +833,6 @@ static int voice_svc_remove(struct platform_device *pdev) device_destroy(voice_svc_class, device_num); class_destroy(voice_svc_class); unregister_chrdev_region(0, MINOR_NUMBER); - kfree(voice_svc_dev); return 0; } |
