gpio-mcp23s08: correctly handling failed allocation
authorInsu Yun <wuninsu@gmail.com>
Tue, 16 Feb 2016 02:19:57 +0000 (21:19 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Feb 2016 15:36:22 +0000 (16:36 +0100)
commitaaf2b3afb93102411412f9dad8d84b13fc7f7edb
treefbaec6ff0177caf4092b61f3322ee63a2cf3017a
parent818cc6a5f8c6030d05f7dcb21970bf5f7db5dcbd
gpio-mcp23s08: correctly handling failed allocation

Since devm_kzalloc can be failed in memory pressure,
it needs to check and return -ENOMEM

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mcp23s08.c