You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mfd: tps65090: Add error prints when mem alloc failed
Add error prints when memory allocation failed for tps65090 data. Also cleanups the melloc arguments. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
e2e8ffc970
commit
e8e6f047e6
@@ -263,10 +263,11 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tps65090 = devm_kzalloc(&client->dev, sizeof(struct tps65090),
|
||||
GFP_KERNEL);
|
||||
if (tps65090 == NULL)
|
||||
tps65090 = devm_kzalloc(&client->dev, sizeof(*tps65090), GFP_KERNEL);
|
||||
if (!tps65090) {
|
||||
dev_err(&client->dev, "mem alloc for tps65090 failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
tps65090->client = client;
|
||||
tps65090->dev = &client->dev;
|
||||
|
||||
Reference in New Issue
Block a user