Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: tps80031: Use IS_ERR to check return value of regulator_register()

regulator_register() does not return NULL, it returns ERR_PTR on error.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Axel Lin and committed by
Mark Brown
d4cbca9e 949db153

+1 -1
+1 -1
drivers/regulator/tps80031-regulator.c
··· 728 728 } 729 729 } 730 730 rdev = regulator_register(&ri->rinfo->desc, &config); 731 - if (IS_ERR_OR_NULL(rdev)) { 731 + if (IS_ERR(rdev)) { 732 732 dev_err(&pdev->dev, 733 733 "register regulator failed %s\n", 734 734 ri->rinfo->desc.name);