Skip to content

Commit

Permalink
[PATCH] spi: check platform_device_register_simple() error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Dec 7, 2006
1 parent 95362fa commit 7b92ff0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/spi/spi_butterfly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7b92ff0

Please sign in to comment.