]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
remoteproc: k3: Call of_node_put(rmem_np) only once in three functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 24 Sep 2024 12:28:35 +0000 (14:28 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 30 Sep 2024 15:50:20 +0000 (09:50 -0600)
commita36d9f96d1cf7c0308bf091e810bec06ce492c3d
tree6fa43f31cdad0a164c7f3517b64182920403bf4a
parent9852d85ec9d492ebef56dc5f229416c925758edc
remoteproc: k3: Call of_node_put(rmem_np) only once in three functions

An of_node_put(rmem_np) call was immediately used after a pointer check
for a of_reserved_mem_lookup() call in three function implementations.
Thus call such a function only once instead directly before the checks.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://lore.kernel.org/r/c46b06f9-72b1-420b-9dce-a392b982140e@web.de
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/ti_k3_dsp_remoteproc.c
drivers/remoteproc/ti_k3_m4_remoteproc.c
drivers/remoteproc/ti_k3_r5_remoteproc.c