BigW Consortium Gitlab

Commit 97196d7f by David Frey

fix error check in probe() for mangoh yellow

Fix a copy/paste error in the mangOH yellow module. Previously, the IMU variable was being checked after calling i2c_new_device to create the magnetometer. The impact of this bug is that a failed probe of the magnetometer would not have been detected during probe of the mangOH yellow driver.
parent 39aba910
......@@ -313,7 +313,7 @@ static int mangoh_yellow_probe(struct platform_device* pdev)
mangoh_yellow_driver_data.magnetometer =
i2c_new_device(i2c_adapter_port1,
&mangoh_yellow_magnetometer_devinfo);
if (!mangoh_yellow_driver_data.imu) {
if (!mangoh_yellow_driver_data.magnetometer) {
dev_err(&pdev->dev, "BMM150 sensor is missing %s\n",
mangoh_yellow_magnetometer_devinfo.type);
ret = -ENODEV;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment