Skip to content

Commit 6df609b

Browse files
committed
Merge branches 'pm-qos' and 'pm-devfreq'
* pm-qos: PM / QoS: return -EINVAL for bogus strings * pm-devfreq: PM / devfreq: constify attribute_group structures. PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe()
3 parents a252c25 + 2ca3033 + 20dd95e commit 6df609b

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

drivers/base/power/sysfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ static ssize_t pm_qos_latency_tolerance_store(struct device *dev,
272272
value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
273273
else if (!strcmp(buf, "any") || !strcmp(buf, "any\n"))
274274
value = PM_QOS_LATENCY_ANY;
275+
else
276+
return -EINVAL;
275277
}
276278
ret = dev_pm_qos_update_user_latency_tolerance(dev, value);
277279
return ret < 0 ? ret : n;

drivers/devfreq/governor_userspace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static struct attribute *dev_entries[] = {
8686
&dev_attr_set_freq.attr,
8787
NULL,
8888
};
89-
static struct attribute_group dev_attr_group = {
89+
static const struct attribute_group dev_attr_group = {
9090
.name = "userspace",
9191
.attrs = dev_entries,
9292
};

drivers/devfreq/rk3399_dmc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
336336

337337
irq = platform_get_irq(pdev, 0);
338338
if (irq < 0) {
339-
dev_err(&pdev->dev, "Cannot get the dmc interrupt resource\n");
340-
return -EINVAL;
339+
dev_err(&pdev->dev,
340+
"Cannot get the dmc interrupt resource: %d\n", irq);
341+
return irq;
341342
}
342343
data = devm_kzalloc(dev, sizeof(struct rk3399_dmcfreq), GFP_KERNEL);
343344
if (!data)

drivers/devfreq/tegra-devfreq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,9 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
688688
}
689689

690690
irq = platform_get_irq(pdev, 0);
691-
if (irq <= 0) {
692-
dev_err(&pdev->dev, "Failed to get IRQ\n");
693-
return -ENODEV;
691+
if (irq < 0) {
692+
dev_err(&pdev->dev, "Failed to get IRQ: %d\n", irq);
693+
return irq;
694694
}
695695

696696
platform_set_drvdata(pdev, tegra);

0 commit comments

Comments
 (0)