Skip to content

Commit

Permalink
usb: musb: omap2430: kill redundant assignments in omap2430_probe()
Browse files Browse the repository at this point in the history
Commit 00a0b1d (usb: musb: omap: Add device
tree support for omap musb glue) added assignments of the 'ret' variable to
-ENOMEM on *some* error paths of the calls to devm_kzalloc(), while that
variable was already pre-initialized for to that value, so these assignments
were completely redundant. Kill them, fixing overindented string, while at it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Sergei Shtylyov authored and Felipe Balbi committed Jan 17, 2013
1 parent 99d17cf commit 8df4ce7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,13 @@ static int omap2430_probe(struct platform_device *pdev)
if (!pdata) {
dev_err(&pdev->dev,
"failed to allocate musb platfrom data\n");
ret = -ENOMEM;
goto err2;
}

data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data) {
dev_err(&pdev->dev,
"failed to allocate musb board data\n");
ret = -ENOMEM;
"failed to allocate musb board data\n");
goto err2;
}

Expand Down

0 comments on commit 8df4ce7

Please sign in to comment.