diff options
Diffstat (limited to 'drivers/cdx/cdx.c')
-rw-r--r-- | drivers/cdx/cdx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c index 929fe3d07eee..b74d76afccb6 100644 --- a/drivers/cdx/cdx.c +++ b/drivers/cdx/cdx.c @@ -607,7 +607,8 @@ static ssize_t rescan_store(const struct bus_type *bus, pd = of_find_device_by_node(np); if (!pd) { of_node_put(np); - return -EINVAL; + count = -EINVAL; + goto unlock; } cdx = platform_get_drvdata(pd); @@ -617,6 +618,7 @@ static ssize_t rescan_store(const struct bus_type *bus, put_device(&pd->dev); } +unlock: mutex_unlock(&cdx_controller_lock); return count; |