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

Commit 0a5c3782 authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

drivers: iio: adc: Update check for PMIC revid in VADC probe



Update check for value of PMIC revid returned to
avoid null pointer dereference.

Change-Id: I2fadae8dbf9541dd40ea4896e656b7edeccc37d2
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 4a3d1ca8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1003,7 +1003,7 @@ static int adc_probe(struct platform_device *pdev)
	revid_dev_node = of_parse_phandle(node, "qcom,pmic-revid", 0);
	if (revid_dev_node) {
		pmic_rev_id = get_revid_data(revid_dev_node);
		if (!(IS_ERR(pmic_rev_id)))
		if (!(IS_ERR_OR_NULL(pmic_rev_id)))
			skip_usb_wa = skip_usb_in_wa(pmic_rev_id);
		else {
			pr_err("Unable to get revid\n");