Skip to content

Commit

Permalink
misc: xilinx_flex: Prevent accessing of uninitialised variables
Browse files Browse the repository at this point in the history
In case of invalid input exit so that uninitialised variables are
not accessed.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
  • Loading branch information
Shubhrajyoti Datta authored and Michal Simek committed Jan 6, 2022
1 parent cae7610 commit 52fd7c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/misc/xilinx_flex_pm.c
Expand Up @@ -298,7 +298,8 @@ static int xflex_sysfs_cmd(struct device *dev, const char *buf,

default:
dev_err(dev, "Invalid option\n");
break;
ret = -EINVAL;
goto exit_unlock;
}

ret = zynqmp_pm_probe_counter_read(domain, reg, &pm_api_ret[0]);
Expand Down

0 comments on commit 52fd7c2

Please sign in to comment.