summaryrefslogtreecommitdiff
path: root/drivers/spi/tle62x0.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-28 17:57:39 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-28 17:57:39 (GMT)
commitd02bf062fbb5e714d84ecefd05106062b9a45159 (patch)
treedde6fa5fe051bb147b7d62261ac204f5a371cb3c /drivers/spi/tle62x0.c
parent04830fccdcafa7e0ea913990ae56437253553fef (diff)
parent9c3e737561b2473ea1fc5b83a0c1d51e1ff3d294 (diff)
downloadlinux-d02bf062fbb5e714d84ecefd05106062b9a45159.tar.xz
Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheral spi/tle620x: add missing device_remove_file()
Diffstat (limited to 'drivers/spi/tle62x0.c')
-rw-r--r--drivers/spi/tle62x0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/tle62x0.c b/drivers/spi/tle62x0.c
index a393895..32a4087 100644
--- a/drivers/spi/tle62x0.c
+++ b/drivers/spi/tle62x0.c
@@ -283,7 +283,7 @@ static int __devinit tle62x0_probe(struct spi_device *spi)
return 0;
err_gpios:
- for (; ptr > 0; ptr--)
+ while (--ptr >= 0)
device_remove_file(&spi->dev, gpio_attrs[ptr]);
device_remove_file(&spi->dev, &dev_attr_status_show);
@@ -301,6 +301,7 @@ static int __devexit tle62x0_remove(struct spi_device *spi)
for (ptr = 0; ptr < st->nr_gpio; ptr++)
device_remove_file(&spi->dev, gpio_attrs[ptr]);
+ device_remove_file(&spi->dev, &dev_attr_status_show);
kfree(st);
return 0;
}