diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2022-03-29 21:16:16 +0530 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2022-04-11 10:04:40 -0600 |
commit | 68d9787bdd5cbfa76e795c4015f8d58b84955a01 (patch) | |
tree | bc300add930a4338688d72fe3a0629d807f19c74 /drivers/remoteproc/remoteproc_core.c | |
parent | f20e232d74ee0ace386be0b7db1ff993ea69b4c4 (diff) |
remoteproc: Don't bother checking the return value of debugfs_create*
DebugFS APIs are designed to return only the error pointers and not NULL
in the case of failure. So these return pointers are safe to be passed on
to the successive debugfs_create* APIs.
Therefore, let's just get rid of the checks.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220329154616.58902-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index c510125769b9..3c8382f66ce2 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -684,10 +684,6 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr, /* create the debugfs entry */ trace->tfile = rproc_create_trace_file(name, rproc, trace); - if (!trace->tfile) { - kfree(trace); - return -EINVAL; - } list_add_tail(&trace->node, &rproc->traces); |