Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312569
b: refs/heads/master
c: baf73e2
h: refs/heads/master
i:
  312567: 022ce3d
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jun 20, 2012
1 parent 853e7f3 commit 3ab1eee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f503071b03dcac6908fb7e051cfc9c45bea084c0
refs/heads/master: baf73e2c4e25aa57a7bd5df90a93e65be0542c74
10 changes: 5 additions & 5 deletions trunk/drivers/regulator/lp872x.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,11 +785,6 @@ static int lp872x_config(struct lp872x *lp)
struct lp872x_platform_data *pdata = lp->pdata;
int ret;

if (!pdata) {
dev_warn(lp->dev, "no platform data\n");
return 0;
}

if (!pdata->update_config)
return 0;

Expand Down Expand Up @@ -889,6 +884,11 @@ static int lp872x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
[LP8725] = LP8725_NUM_REGULATORS,
};

if (!pdata) {
dev_warn(&cl->dev, "no platform data\n");
return -EINVAL;
}

lp = devm_kzalloc(&cl->dev, sizeof(struct lp872x), GFP_KERNEL);
if (!lp)
goto err_mem;
Expand Down

0 comments on commit 3ab1eee

Please sign in to comment.