diff options
author | Mark Brown <broonie@kernel.org> | 2020-08-17 14:42:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-08-17 14:42:55 +0300 |
commit | 59e305a6225400d8b4239c7440d84046ca5100ea (patch) | |
tree | fbb84ed996a383260ba774d1c3f848b3f8c9705f /drivers/regulator | |
parent | 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff) | |
parent | 09dad81e0f1701ea26babe2442a1478d6ad447d3 (diff) | |
download | linux-59e305a6225400d8b4239c7440d84046ca5100ea.tar.xz |
Merge existing fixes from regulator/for-5.9
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/cros-ec-regulator.c | 3 | ||||
-rw-r--r-- | drivers/regulator/fixed.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c index 3117bbd2826b..eb3fc1db4edc 100644 --- a/drivers/regulator/cros-ec-regulator.c +++ b/drivers/regulator/cros-ec-regulator.c @@ -170,6 +170,9 @@ static int cros_ec_regulator_init_info(struct device *dev, data->voltages_mV = devm_kmemdup(dev, resp.voltages_mv, sizeof(u16) * data->num_voltages, GFP_KERNEL); + if (!data->voltages_mV) + return -ENOMEM; + data->desc.n_voltages = data->num_voltages; /* Make sure the returned name is always a valid string */ diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index d54830e48b8d..142a70a89153 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -182,7 +182,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) drvdata->enable_clock = devm_clk_get(dev, NULL); if (IS_ERR(drvdata->enable_clock)) { - dev_err(dev, "Cant get enable-clock from devicetree\n"); + dev_err(dev, "Can't get enable-clock from devicetree\n"); return -ENOENT; } } else { |