Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329724
b: refs/heads/master
c: 4dbb845
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Herbert Xu committed Aug 20, 2012
1 parent 4a4a5c7 commit 8d8614b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 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: 33b58b01ac2b7aadbd5143c74b029aee0ce9ac33
refs/heads/master: 4dbb845ddedff87fc1289ad0e2d780a4a7918356
17 changes: 5 additions & 12 deletions trunk/drivers/char/hw_random/octeon-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,42 +75,35 @@ static int __devinit octeon_rng_probe(struct platform_device *pdev)

res_ports = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res_ports)
goto err_ports;
return -ENOENT;

res_result = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res_result)
goto err_ports;
return -ENOENT;


rng->control_status = devm_ioremap_nocache(&pdev->dev,
res_ports->start,
sizeof(u64));
if (!rng->control_status)
goto err_ports;
return -ENOENT;

rng->result = devm_ioremap_nocache(&pdev->dev,
res_result->start,
sizeof(u64));
if (!rng->result)
goto err_r;
return -ENOENT;

rng->ops = ops;

dev_set_drvdata(&pdev->dev, &rng->ops);
ret = hwrng_register(&rng->ops);
if (ret)
goto err;
return -ENOENT;

dev_info(&pdev->dev, "Octeon Random Number Generator\n");

return 0;
err:
devm_iounmap(&pdev->dev, rng->control_status);
err_r:
devm_iounmap(&pdev->dev, rng->result);
err_ports:
devm_kfree(&pdev->dev, rng);
return -ENOENT;
}

static int __exit octeon_rng_remove(struct platform_device *pdev)
Expand Down

0 comments on commit 8d8614b

Please sign in to comment.