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

Commit ab6b6b03 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "i2c-msm-v2: Add NULL pointer check"

parents b79f536b 8412463a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2276,6 +2276,11 @@ i2c_msm_frmwrk_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
	struct i2c_msm_ctrl      *ctrl = i2c_get_adapdata(adap);
	struct i2c_msm_xfer      *xfer = &ctrl->xfer;

	if (IS_ERR_OR_NULL(msgs)) {
		dev_err(ctrl->dev, " error on msgs Accessing invalid  pointer location\n");
		return PTR_ERR(msgs);
	}

	ret = i2c_msm_pm_xfer_start(ctrl);
	if (ret)
		return ret;