mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +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
@ -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…
x
Reference in New Issue
Block a user