diff options
| author | Michal Simek <[email protected]> | 2023-06-01 13:25:04 +0200 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2023-06-12 13:25:02 +0200 |
| commit | 511e820c067b6e3a66fe86f0c0036ea7c9d635ef (patch) | |
| tree | 2373c38cb8fca88859b63e6039aeef569b1c4bb0 | |
| parent | 04cc6f0a53a64c9ea3645c8538a27c8ceded1a6c (diff) | |
arm64: zynqmp: Fix return code from do_zynqmp_pmufw()
zynqmp_pmufw_node() can also return values like -ENODEV which means that
NODE has been already configured that's why don't propagate this error
code.
Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/e52d24d8d3efb276778d387dc716e4e065e0626f.1685618701.git.michal.simek@amd.com
| -rw-r--r-- | board/xilinx/zynqmp/cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c index 9d375b07550..930592ffb5c 100644 --- a/board/xilinx/zynqmp/cmds.c +++ b/board/xilinx/zynqmp/cmds.c @@ -211,6 +211,7 @@ static int do_zynqmp_pmufw(struct cmd_tbl *cmdtp, int flag, int argc, if (!strncmp(argv[2], "node", 4)) { u32 id; + int ret; if (!strncmp(argv[3], "close", 5)) return zynqmp_pmufw_config_close(); @@ -223,7 +224,11 @@ static int do_zynqmp_pmufw(struct cmd_tbl *cmdtp, int flag, int argc, printf("Enable permission for node ID %d\n", id); - return zynqmp_pmufw_node(id); + ret = zynqmp_pmufw_node(id); + if (ret == -ENODEV) + ret = 0; + + return ret; } addr = hextoul(argv[2], NULL); |
