summaryrefslogtreecommitdiff
path: root/drivers/net/rswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/rswitch.c')
-rw-r--r--drivers/net/rswitch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/rswitch.c b/drivers/net/rswitch.c
index 62d3f39f071..f27587ac8bd 100644
--- a/drivers/net/rswitch.c
+++ b/drivers/net/rswitch.c
@@ -1110,8 +1110,10 @@ static int rswitch_probe(struct udevice *dev)
return -EINVAL;
priv->rsw_clk = devm_clk_get(dev, NULL);
- if (ret)
+ if (IS_ERR(priv->rsw_clk)) {
+ ret = PTR_ERR(priv->rsw_clk);
goto err_map;
+ }
ret = clk_prepare_enable(priv->rsw_clk);
if (ret)