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

Commit 2b274fe5 authored by Chao Xie's avatar Chao Xie Committed by Samuel Ortiz
Browse files

mfd: 88pm805: Fix potential NULL pdata dereference



User pass platform data to device, and platform data may be
NULL. Add the check for pdata.

Signed-off-by: default avatarChao Xie <chao.xie@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent b432fc25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ static int pm805_probe(struct i2c_client *client,
		goto err_805_init;
	}

	if (pdata->plat_config)
	if (pdata && pdata->plat_config)
		pdata->plat_config(chip, pdata);

err_805_init: