diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-07 04:39:05 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 16:39:42 (GMT) |
commit | 7b92ff01c2cd21567c3342c1c77d5e4f1a2bd699 (patch) | |
tree | 1199e6eefd7bd544321a7f12560f34db1a1f3516 | |
parent | 95362fa90312ff2d52c0b4d42412cd7ceeb3b89b (diff) | |
download | linux-fsl-qoriq-7b92ff01c2cd21567c3342c1c77d5e4f1a2bd699.tar.xz |
[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>
-rw-r--r-- | drivers/spi/spi_butterfly.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c index c2f601f..312987a 100644 --- a/drivers/spi/spi_butterfly.c +++ b/drivers/spi/spi_butterfly.c @@ -251,6 +251,8 @@ static void butterfly_attach(struct parport *p) * setting up a platform device like this is an ugly kluge... */ pdev = platform_device_register_simple("butterfly", -1, NULL, 0); + if (IS_ERR(pdev)) + return; master = spi_alloc_master(&pdev->dev, sizeof *pp); if (!master) { |