Skip to content

Commit

Permalink
remoteproc: keystone: 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-1-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 8c8df9b commit bd04718
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/remoteproc/keystone_remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev,
{
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
int ret;

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

ksproc->dev_ctrl =
syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev");
if (IS_ERR(ksproc->dev_ctrl)) {
ret = PTR_ERR(ksproc->dev_ctrl);
return ret;
}
if (IS_ERR(ksproc->dev_ctrl))
return PTR_ERR(ksproc->dev_ctrl);

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

0 comments on commit bd04718

Please sign in to comment.