commit | 95601d65a1aa0902f838a2919e11ee6311efe371 | [log] [tgz] |
---|---|---|
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | Tue Feb 05 14:14:32 2013 +0000 |
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | Tue Feb 05 14:14:32 2013 +0000 |
tree | ec7c23fc0a78732a1e9c7214b015bbff6be8df2a | |
parent | f88948eff9a6160ed74e3ee4b12f41f5beeff115 [diff] [blame] |
regmap: spi: Handle allocation failures gracefully Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --git a/drivers/base/regmap/regmap-spi.c b/drivers/base/regmap/regmap-spi.c index 913274b..4c506bd 100644 --- a/drivers/base/regmap/regmap-spi.c +++ b/drivers/base/regmap/regmap-spi.c
@@ -86,6 +86,8 @@ struct regmap_async_spi *async_spi; async_spi = kzalloc(sizeof(*async_spi), GFP_KERNEL); + if (!async_spi) + return NULL; return &async_spi->core; }