mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 05:31:37 -04:00
regulator: max20411: show failure on register
It is easy to use %pe to print a error-pointer so add this to the dev_err() if the devm_regulator_register() fails. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Link: https://patch.msgid.link/20260305184623.2603269-1-ben.dooks@codethink.co.uk Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -133,7 +133,7 @@ static int max20411_probe(struct i2c_client *client)
|
||||
|
||||
max20411->rdev = devm_regulator_register(max20411->dev, &max20411->desc, &cfg);
|
||||
if (IS_ERR(max20411->rdev))
|
||||
dev_err(max20411->dev, "Failed to register regulator\n");
|
||||
dev_err(max20411->dev, "Failed to register regulator: %pe\n", max20411->rdev);
|
||||
|
||||
return PTR_ERR_OR_ZERO(max20411->rdev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user