Skip to content

Commit bd04718

Browse files
krzkmathieupoirier
authored andcommitted
remoteproc: keystone: Simplify returning syscon PTR_ERR
No need to store PTR_ERR into temporary, local 'ret' variable. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-1-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 8c8df9b commit bd04718

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/remoteproc/keystone_remoteproc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev,
335335
{
336336
struct device_node *np = pdev->dev.of_node;
337337
struct device *dev = &pdev->dev;
338-
int ret;
339338

340339
if (!of_property_read_bool(np, "ti,syscon-dev")) {
341340
dev_err(dev, "ti,syscon-dev property is absent\n");
@@ -344,10 +343,8 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev,
344343

345344
ksproc->dev_ctrl =
346345
syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev");
347-
if (IS_ERR(ksproc->dev_ctrl)) {
348-
ret = PTR_ERR(ksproc->dev_ctrl);
349-
return ret;
350-
}
346+
if (IS_ERR(ksproc->dev_ctrl))
347+
return PTR_ERR(ksproc->dev_ctrl);
351348

352349
if (of_property_read_u32_index(np, "ti,syscon-dev", 1,
353350
&ksproc->boot_offset)) {

0 commit comments

Comments
 (0)