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

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

Merge "ASoC: wcd9xxx: fix the NULL pointer dereference causing the crash"

parents 14ff85b1 efbd62ae
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1375,6 +1375,7 @@ err_supplies:
	wcd9xxx_disable_supplies(wcd9xxx, pdata);
err_codec:
	kfree(wcd9xxx);
	dev_set_drvdata(&client->dev, NULL);
fail:
	return ret;
}
@@ -1387,6 +1388,7 @@ static int wcd9xxx_i2c_remove(struct i2c_client *client)
	wcd9xxx = dev_get_drvdata(&client->dev);
	wcd9xxx_disable_supplies(wcd9xxx, pdata);
	wcd9xxx_device_exit(wcd9xxx);
	dev_set_drvdata(&client->dev, NULL);
	return 0;
}

@@ -1897,6 +1899,7 @@ err_supplies:
	wcd9xxx_disable_supplies(wcd9xxx, pdata);
err_codec:
	kfree(wcd9xxx);
	slim_set_clientdata(slim, NULL);
err:
	return ret;
}
@@ -1915,6 +1918,7 @@ static int wcd9xxx_slim_remove(struct slim_device *pdev)
	slim_remove_device(wcd9xxx->slim_slave);
	wcd9xxx_disable_supplies(wcd9xxx, pdata);
	wcd9xxx_device_exit(wcd9xxx);
	slim_set_clientdata(pdev, NULL);
	return 0;
}