diff options
Diffstat (limited to 'drivers/gpio/gpio-sim.c')
-rw-r--r-- | drivers/gpio/gpio-sim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c index ef6145f51c8a..bef00dcc4dc8 100644 --- a/drivers/gpio/gpio-sim.c +++ b/drivers/gpio/gpio-sim.c @@ -886,7 +886,8 @@ static int gpio_sim_device_activate_unlocked(struct gpio_sim_device *dev) list_for_each_entry(bank, &dev->bank_list, siblings) { bank->swnode = gpio_sim_make_bank_swnode(bank, swnode); - if (ret) { + if (IS_ERR(bank->swnode)) { + ret = PTR_ERR(bank->swnode); gpio_sim_remove_swnode_recursive(swnode); return ret; } |