projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95362fa
)
[PATCH] spi: check platform_device_register_simple() error
author
Akinobu Mita
<akinobu.mita@gmail.com>
Thu, 7 Dec 2006 04:39:05 +0000
(20:39 -0800)
committer
Linus Torvalds
<torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:42 +0000
(08:39 -0800)
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>
drivers/spi/spi_butterfly.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi_butterfly.c
b/drivers/spi/spi_butterfly.c
index c2f601f8e4f21df7106952a147c83c2e13626fca..312987a0321072aa2c9974c8b476ffc97416b7bb 100644
(file)
--- a/
drivers/spi/spi_butterfly.c
+++ b/
drivers/spi/spi_butterfly.c
@@
-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) {