Skip to content

Commit

Permalink
remoteproc: omap: Simplify returning syscon PTR_ERR
Browse files Browse the repository at this point in the history
No need to store PTR_ERR into temporary, local 'ret' variable.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-2-73ed6fafa1e3@linaro.org
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
  • Loading branch information
Krzysztof Kozlowski authored and Mathieu Poirier committed Jan 15, 2025
1 parent bd04718 commit cf1d4fd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/remoteproc/omap_remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,6 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev,
struct device_node *np = pdev->dev.of_node;
struct omap_rproc *oproc = rproc->priv;
const struct omap_rproc_dev_data *data;
int ret;

data = of_device_get_match_data(&pdev->dev);
if (!data)
Expand All @@ -1153,10 +1152,8 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev,

oproc->boot_data->syscon =
syscon_regmap_lookup_by_phandle(np, "ti,bootreg");
if (IS_ERR(oproc->boot_data->syscon)) {
ret = PTR_ERR(oproc->boot_data->syscon);
return ret;
}
if (IS_ERR(oproc->boot_data->syscon))
return PTR_ERR(oproc->boot_data->syscon);

if (of_property_read_u32_index(np, "ti,bootreg", 1,
&oproc->boot_data->boot_reg)) {
Expand Down

0 comments on commit cf1d4fd

Please sign in to comment.