gpu: ion: Fix bug in ion_free
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / ion / ion.c
index cde2d1c2dc59e9edebe99096362d65661036ca75..9c08737017916c454bb8a2830ddb25c2f38725f5 100644 (file)
@@ -406,6 +406,7 @@ void ion_free(struct ion_client *client, struct ion_handle *handle)
 
        if (!valid_handle) {
                WARN(1, "%s: invalid handle passed to free.\n", __func__);
+               mutex_unlock(&client->lock);
                return;
        }
        ion_handle_put(handle);