Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f793c0d authored by Can Guo's avatar Can Guo Committed by Gerrit - the friendly Code Review server
Browse files

Fingerprint: fix potential null pointer dereference issue



The pointer of two-dimensional array which may cause some
null pointer dereference. eg..fpc1020->pinctrl_state[1] is
not initialized by default, although fpc1020->pinctrl_state
is initialized by default. Use one dimensional array pointer
to fix the issue.

Change-Id: Ib36abe2ec60c1e5d5636471bec6c11f482313814
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 7afca241
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -75,8 +75,8 @@ static const struct vreg_config vreg_conf[] = {
struct fpc1020_data {
	struct device *dev;
	struct pinctrl *fingerprint_pinctrl;
	struct pinctrl_state **pinctrl_state;
	struct regulator **vreg;
	struct pinctrl_state *pinctrl_state[ARRAY_SIZE(pctl_names)];
	struct regulator *vreg[ARRAY_SIZE(vreg_conf)];
	struct wakeup_source ttw_wl;
	struct mutex lock; /* To set/get exported values in sysfs */
	int irq_gpio;