Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348640
b: refs/heads/master
c: dd5700e
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Jan 13, 2013
1 parent c54a33e commit 3802ec0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82c805abb20946dcb343cd607327e4d720bf6b28
refs/heads/master: dd5700ea98ad0b375a72525ce7d7edddf15b2693
4 changes: 1 addition & 3 deletions trunk/drivers/gpu/drm/nouveau/core/core/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ nouveau_client_create_(const char *name, u64 devname, const char *cfg,

ret = nouveau_handle_create(nv_object(client), ~0, ~0,
nv_object(client), &client->root);
if (ret) {
nouveau_namedb_destroy(&client->base);
if (ret)
return ret;
}

/* prevent init/fini being called, os in in charge of this */
atomic_set(&nv_object(client)->usecount, 2);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/core/include/core/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ nouveau_client(void *obj)

int nouveau_client_create_(const char *name, u64 device, const char *cfg,
const char *dbg, int, void **);
#define nouveau_client_destroy(p) \
nouveau_namedb_destroy(&(p)->base)

int nouveau_client_init(struct nouveau_client *);
int nouveau_client_fini(struct nouveau_client *, bool suspend);

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,16 @@ nouveau_cli_create(struct pci_dev *pdev, const char *name,
struct nouveau_cli *cli;
int ret;

*pcli = NULL;
ret = nouveau_client_create_(name, nouveau_name(pdev), nouveau_config,
nouveau_debug, size, pcli);
cli = *pcli;
if (ret)
if (ret) {
if (cli)
nouveau_client_destroy(&cli->base);
*pcli = NULL;
return ret;
}

mutex_init(&cli->mutex);
return 0;
Expand Down

0 comments on commit 3802ec0

Please sign in to comment.