We shouldn't pass devm allocated pointers to kfree() or it leads to a
double free.
Fixes:
a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
r = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
if (r != ARRAY_SIZE(msg)) {
- kfree(buffer);
dev_err(&client->dev, "read failed at 0x%03x\n", addr);
return NULL;
}
r = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
if (r != ARRAY_SIZE(msg)) {
- kfree(buffer);
dev_err(&client->dev, "read failed at 0x%03x\n", addr);
return NULL;
}