Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291952
b: refs/heads/master
c: 00ffc13
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Grant Likely committed Mar 9, 2012
1 parent b32f2f0 commit a08399a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: e290cf276bc2a6cdcb360fd72b7a6a24539505fc
refs/heads/master: 00ffc13f35f1a5b2d8dc9f2dd2f410f017330a97
11 changes: 3 additions & 8 deletions trunk/drivers/spi/spi-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,13 +793,8 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)

ret = gpio_request(spi_imx->chipselect[i], DRIVER_NAME);
if (ret) {
while (i > 0) {
i--;
if (spi_imx->chipselect[i] >= 0)
gpio_free(spi_imx->chipselect[i]);
}
dev_err(&pdev->dev, "can't get cs gpios\n");
goto out_master_put;
goto out_gpio_free;
}
}

Expand Down Expand Up @@ -881,10 +876,10 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
out_release_mem:
release_mem_region(res->start, resource_size(res));
out_gpio_free:
for (i = 0; i < master->num_chipselect; i++)
while (--i >= 0) {
if (spi_imx->chipselect[i] >= 0)
gpio_free(spi_imx->chipselect[i]);
out_master_put:
}
spi_master_put(master);
kfree(master);
platform_set_drvdata(pdev, NULL);
Expand Down

0 comments on commit a08399a

Please sign in to comment.