summaryrefslogtreecommitdiff
path: root/drivers/platform/surface/aggregator/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/surface/aggregator/bus.c')
-rw-r--r--drivers/platform/surface/aggregator/bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
index aaad41294200..42ccd7f1c9b9 100644
--- a/drivers/platform/surface/aggregator/bus.c
+++ b/drivers/platform/surface/aggregator/bus.c
@@ -485,8 +485,10 @@ int __ssam_register_clients(struct device *parent, struct ssam_controller *ctrl,
* device, so ignore it and continue with the next one.
*/
status = ssam_add_client_device(parent, ctrl, child);
- if (status && status != -ENODEV)
+ if (status && status != -ENODEV) {
+ fwnode_handle_put(child);
goto err;
+ }
}
return 0;