]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
remoteproc: core: Drop redundant initialization of 'ret' in rproc_shutdown()
authorPeng Fan <peng.fan@nxp.com>
Thu, 16 Oct 2025 11:47:58 +0000 (19:47 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 27 Oct 2025 15:25:49 +0000 (09:25 -0600)
The variable ret is immediately assigned the return value of
mutex_lock_interruptible(), making its prior initialization to zero
unnecessary. Remove the redundant assignment

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20251016-rproc-cleanup-v3-v3-1-774083716e8a@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/remoteproc_core.c

index 82567210052893a501e7591204af1feb07befb22..29bbaa349e340eedd122fb553004f7e6a5c46e55 100644 (file)
@@ -1989,7 +1989,7 @@ EXPORT_SYMBOL(rproc_boot);
 int rproc_shutdown(struct rproc *rproc)
 {
        struct device *dev = &rproc->dev;
-       int ret = 0;
+       int ret;
 
        ret = mutex_lock_interruptible(&rproc->lock);
        if (ret) {