mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
[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>
This commit is contained in:
parent
95362fa903
commit
7b92ff01c2
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue