mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 01:56:21 +07:00
Input: ads7864 - check return value of regulator enable
At least print a warning if we can't power the device up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
3973501971
commit
f94352f8db
@ -236,7 +236,12 @@ static void __ads7846_disable(struct ads7846 *ts)
|
||||
/* Must be called with ts->lock held */
|
||||
static void __ads7846_enable(struct ads7846 *ts)
|
||||
{
|
||||
regulator_enable(ts->reg);
|
||||
int error;
|
||||
|
||||
error = regulator_enable(ts->reg);
|
||||
if (error != 0)
|
||||
dev_err(&ts->spi->dev, "Failed to enable supply: %d\n", error);
|
||||
|
||||
ads7846_restart(ts);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user