summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-08-02 20:42:19 +0530
committerSimone Willett <swillett@nvidia.com>2012-08-03 14:03:43 -0700
commitd6c59f11b82022478d51acaf5a7db6107340d355 (patch)
tree2a31b0b1a389c86018e05f73aa59d5d74884252b
parentf0418d51dd8388c195530129b00020d52b8a892e (diff)
mfd: tps65090: print error message when malloc failed
Prints error message when memory alloc failed for easing debugging. Change-Id: I6a8ae68702b01ec975f0130ee78aae3c9ac89c1b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/120845
-rw-r--r--drivers/mfd/tps65090.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index 174166445ab0..1071f6cc0f34 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -225,10 +225,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->dev = &client->dev;
i2c_set_clientdata(client, tps65090);