summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-08-17 13:42:55 +0200
committerMark Brown <broonie@kernel.org>2020-08-17 13:42:55 +0200
commit59e305a6225400d8b4239c7440d84046ca5100ea (patch)
treefbb84ed996a383260ba774d1c3f848b3f8c9705f /drivers
parentLinux 5.9-rc1 (diff)
parentregulator: fix spelling mistake "Cant" -> "Can't" (diff)
downloadlinux-59e305a6225400d8b4239c7440d84046ca5100ea.tar.xz
linux-59e305a6225400d8b4239c7440d84046ca5100ea.zip
Merge existing fixes from regulator/for-5.9
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/cros-ec-regulator.c3
-rw-r--r--drivers/regulator/fixed.c2
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 {