Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299112
b: refs/heads/master
c: 474a898
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and Greg Kroah-Hartman committed Apr 12, 2012
1 parent 74b0baf commit f9a902b
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 17b7e1ba1e2ecc9a09f5e154e555accd2a2eaedf
refs/heads/master: 474a89885f77953b12bce9f23660c31ef5c2630e
11 changes: 7 additions & 4 deletions trunk/drivers/staging/android/persistent_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,26 +399,26 @@ static __init
struct persistent_ram_zone *__persistent_ram_init(struct device *dev, bool ecc)
{
struct persistent_ram_zone *prz;
int ret;
int ret = -ENOMEM;

prz = kzalloc(sizeof(struct persistent_ram_zone), GFP_KERNEL);
if (!prz) {
pr_err("persistent_ram: failed to allocate persistent ram zone\n");
return ERR_PTR(-ENOMEM);
goto err;
}

INIT_LIST_HEAD(&prz->node);

ret = persistent_ram_buffer_init(dev_name(dev), prz);
if (ret) {
pr_err("persistent_ram: failed to initialize buffer\n");
return ERR_PTR(ret);
goto err;
}

prz->ecc = ecc;
ret = persistent_ram_init_ecc(prz, prz->buffer_size);
if (ret)
return ERR_PTR(ret);
goto err;

if (prz->buffer->sig == PERSISTENT_RAM_SIG) {
if (buffer_size(prz) > prz->buffer_size ||
Expand All @@ -442,6 +442,9 @@ struct persistent_ram_zone *__persistent_ram_init(struct device *dev, bool ecc)
atomic_set(&prz->buffer->size, 0);

return prz;
err:
kfree(prz);
return ERR_PTR(ret);
}

struct persistent_ram_zone * __init
Expand Down

0 comments on commit f9a902b

Please sign in to comment.