i2c: cp2615: check for allocation failure in cp2615_i2c_recv()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 May 2021 10:06:41 +0000 (13:06 +0300)
committerWolfram Sang <wsa@kernel.org>
Sun, 20 Jun 2021 21:13:34 +0000 (23:13 +0200)
commit2269583753d2b8fdd3c861a516ff0cdbfcf4ef0b
treeb76ce5803de295571cfd434da9c079d94d44355d
parent065b6211a87746e196b56759a70c7851418dd741
i2c: cp2615: check for allocation failure in cp2615_i2c_recv()

We need to add a check for if the kzalloc() fails.

Fixes: 4a7695429ead ("i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio Bridge")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bence Csókás <bence98@sch.bme.hu>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-cp2615.c