Browse Source

drm/tegra: fix missing unlock on error

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>
Wei Yongjun 12 years ago
parent
commit
b6f2056f3b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/gpu/host1x/drm/drm.c

+ 2 - 0
drivers/gpu/host1x/drm/drm.c

@@ -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;
 			}
 		}