]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/tegra: fix missing unlock on error
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 24 Apr 2013 02:48:23 +0000 (10:48 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Sat, 25 May 2013 10:32:50 +0000 (12:32 +0200)
Add the missing unlock before return from function host1x_drm_init() and
host1x_drm_exit() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/gpu/host1x/drm/drm.c

index 78b07db37cf8bc7f0c8a8aa62060a096c91d17d9..66629f398f113fe41132fde973f0b89b25dea02c 100644 (file)
@@ -148,6 +148,7 @@ int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
                                dev_err(host1x->dev,
                                        "DRM setup failed for %s: %d\n",
                                        dev_name(client->dev), err);
+                               mutex_unlock(&host1x->clients_lock);
                                return err;
                        }
                }
@@ -175,6 +176,7 @@ int host1x_drm_exit(struct host1x_drm *host1x)
                                dev_err(host1x->dev,
                                        "DRM cleanup failed for %s: %d\n",
                                        dev_name(client->dev), err);
+                               mutex_unlock(&host1x->clients_lock);
                                return err;
                        }
                }