adding missing mutex_unlock()

Signed-off-by: Saurabh Sengar <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c 
b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index d336c22..280bd8e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -54,11 +54,11 @@ nouveau_abi16_get(struct drm_file *file_priv, struct 
drm_device *dev)
                        if (nvif_device_init(&cli->base.object,
                                             NOUVEAU_ABI16_DEVICE, NV_DEVICE,
                                             &args, sizeof(args),
-                                            &abi16->device) == 0)
-                               return cli->abi16;
+                                            &abi16->device)) {
 
-                       kfree(cli->abi16);
-                       cli->abi16 = NULL;
+                               kfree(cli->abi16);
+                               cli->abi16 = NULL;
+                       }
                }
 
                mutex_unlock(&cli->mutex);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to