regulator_register(&lp8755_regulators[buck_num], &rconfig);
if (IS_ERR(pchip->rdev[buck_num])) {
ret = PTR_ERR(pchip->rdev[buck_num]);
- dev_err(pchip->dev, "regulator init failed: buck 0\n");
+ pchip->rdev[buck_num] = NULL;
+ dev_err(pchip->dev, "regulator init failed: buck %d\n",
+ buck_num);
goto err_buck;
}
}
err_buck:
for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
- if (pchip->rdev[icnt] != NULL)
- regulator_unregister(pchip->rdev[icnt]);
+ regulator_unregister(pchip->rdev[icnt]);
return ret;
}
.name = LP8755_NAME,
},
.probe = lp8755_probe,
- .remove = __devexit_p(lp8755_remove),
+ .remove = lp8755_remove,
.id_table = lp8755_id,
};