Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325999
b: refs/heads/master
c: 58efc77
h: refs/heads/master
i:
  325997: 7015a7a
  325995: d270f4d
  325991: 46549f1
  325983: fa10887
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 89876dc commit 3d78e6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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: 1cd572fc0c5f6887ea0542e2d3ec26625e2cdfb7
refs/heads/master: 58efc77c86af5cb81d7d7ea0c3c3e675e7d121dc
15 changes: 4 additions & 11 deletions trunk/drivers/usb/renesas_usbhs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,16 @@ static int usbhs_probe(struct platform_device *pdev)
}

/* usb private data */
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
dev_err(&pdev->dev, "Could not allocate priv\n");
return -ENOMEM;
}

priv->base = ioremap_nocache(res->start, resource_size(res));
priv->base = devm_request_and_ioremap(&pdev->dev, res);
if (!priv->base) {
dev_err(&pdev->dev, "ioremap error.\n");
ret = -ENOMEM;
goto probe_end_kfree;
return -ENOMEM;
}

/*
Expand Down Expand Up @@ -485,7 +484,7 @@ static int usbhs_probe(struct platform_device *pdev)
/* call pipe and module init */
ret = usbhs_pipe_probe(priv);
if (ret < 0)
goto probe_end_iounmap;
return ret;

ret = usbhs_fifo_probe(priv);
if (ret < 0)
Expand Down Expand Up @@ -546,10 +545,6 @@ static int usbhs_probe(struct platform_device *pdev)
usbhs_fifo_remove(priv);
probe_end_pipe_exit:
usbhs_pipe_remove(priv);
probe_end_iounmap:
iounmap(priv->base);
probe_end_kfree:
kfree(priv);

dev_info(&pdev->dev, "probe failed\n");

Expand All @@ -576,8 +571,6 @@ static int __devexit usbhs_remove(struct platform_device *pdev)
usbhs_mod_remove(priv);
usbhs_fifo_remove(priv);
usbhs_pipe_remove(priv);
iounmap(priv->base);
kfree(priv);

return 0;
}
Expand Down

0 comments on commit 3d78e6e

Please sign in to comment.