Skip to content

Commit 488540b

Browse files
silviupopescurafaeljw
authored andcommitted
cpuidle: kirkwood: fix coccicheck warnings
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9a23fe6 commit 488540b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/cpuidle/cpuidle-kirkwood.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev)
6666
if (res == NULL)
6767
return -EINVAL;
6868

69-
ddr_operation_base = devm_request_and_ioremap(&pdev->dev, res);
70-
if (!ddr_operation_base)
71-
return -EADDRNOTAVAIL;
69+
ddr_operation_base = devm_ioremap_resource(&pdev->dev, res);
70+
if (IS_ERR(ddr_operation_base))
71+
return PTR_ERR(ddr_operation_base);
7272

7373
device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
7474
device->state_count = KIRKWOOD_MAX_STATES;

0 commit comments

Comments
 (0)