Commit 7b92ff01 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 95362fa9
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment