mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
regmap: spi: Handle allocation failures gracefully
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
f88948eff9
commit
95601d65a1
1 changed files with 2 additions and 0 deletions
|
|
@ -86,6 +86,8 @@ static struct regmap_async *regmap_spi_async_alloc(void)
|
|||
struct regmap_async_spi *async_spi;
|
||||
|
||||
async_spi = kzalloc(sizeof(*async_spi), GFP_KERNEL);
|
||||
if (!async_spi)
|
||||
return NULL;
|
||||
|
||||
return &async_spi->core;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue