Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161723
b: refs/heads/master
c: 6c75933
h: refs/heads/master
i:
  161721: 6798ca8
  161719: ee3b94e
v: v3
  • Loading branch information
Julia Lawall authored and Benjamin Herrenschmidt committed Aug 20, 2009
1 parent 4531b26 commit 5290146
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 8dcd038a13b8e322c49fe0d3e31a0deaba4fd5fd
refs/heads/master: 6c75933c00049bee59562a18843a4f133ec2bfe4
18 changes: 14 additions & 4 deletions trunk/arch/powerpc/sysdev/fsl_rio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,21 +1057,29 @@ int fsl_rio_setup(struct of_device *dev)
law_start, law_size);

ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL);
if (!ops) {
rc = -ENOMEM;
goto err_ops;
}
ops->lcread = fsl_local_config_read;
ops->lcwrite = fsl_local_config_write;
ops->cread = fsl_rio_config_read;
ops->cwrite = fsl_rio_config_write;
ops->dsend = fsl_rio_doorbell_send;

port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL);
if (!port) {
rc = -ENOMEM;
goto err_port;
}
port->id = 0;
port->index = 0;

priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL);
if (!priv) {
printk(KERN_ERR "Can't alloc memory for 'priv'\n");
rc = -ENOMEM;
goto err;
goto err_priv;
}

INIT_LIST_HEAD(&port->dbells);
Expand Down Expand Up @@ -1169,11 +1177,13 @@ int fsl_rio_setup(struct of_device *dev)

return 0;
err:
if (priv)
iounmap(priv->regs_win);
kfree(ops);
iounmap(priv->regs_win);
kfree(priv);
err_priv:
kfree(port);
err_port:
kfree(ops);
err_ops:
return rc;
}

Expand Down

0 comments on commit 5290146

Please sign in to comment.