gpu: ion: Fix bug in ion_free
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 13 Dec 2013 22:24:02 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:38 +0000 (08:55 -0800)
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c

index f7dc82163c714cfbaa62c6cac8b9144e7ccacffb..e52522c11c5ff5719394868f61e101df7d02d2b0 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);