aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_butterfly.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-06 23:39:05 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:42 -0500
commit7b92ff01c2cd21567c3342c1c77d5e4f1a2bd699 (patch)
tree1199e6eefd7bd544321a7f12560f34db1a1f3516 /drivers/spi/spi_butterfly.c
parent95362fa90312ff2d52c0b4d42412cd7ceeb3b89b (diff)
[PATCH] spi: check platform_device_register_simple() error
Check the return value of platform_device_register_simple(). Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/spi/spi_butterfly.c')
-rw-r--r--drivers/spi/spi_butterfly.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index c2f601f8e4f2..312987a03210 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -251,6 +251,8 @@ static void butterfly_attach(struct parport *p)
251 * setting up a platform device like this is an ugly kluge... 251 * setting up a platform device like this is an ugly kluge...
252 */ 252 */
253 pdev = platform_device_register_simple("butterfly", -1, NULL, 0); 253 pdev = platform_device_register_simple("butterfly", -1, NULL, 0);
254 if (IS_ERR(pdev))
255 return;
254 256
255 master = spi_alloc_master(&pdev->dev, sizeof *pp); 257 master = spi_alloc_master(&pdev->dev, sizeof *pp);
256 if (!master) { 258 if (!master) {