提交 7b92ff01 编写于 作者: A Akinobu Mita 提交者: 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: NAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册