Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358628
b: refs/heads/master
c: ef754e8
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Bryan Wu committed Feb 7, 2013
1 parent 5c95520 commit 7df0326
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: ad0ba85fab7da9e634c9da4f96315c8d0b9febcb
refs/heads/master: ef754e88e35f86d9704f79ac8dace8c66f367164
10 changes: 3 additions & 7 deletions trunk/drivers/leds/leds-tca6507.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,14 +674,10 @@ tca6507_led_dt_init(struct i2c_client *client)
struct device_node *np = client->dev.of_node, *child;
struct tca6507_platform_data *pdata;
struct led_info *tca_leds;
int count = 0;
int count;

for_each_child_of_node(np, child)
count++;
if (!count)
return ERR_PTR(-ENODEV);

if (count > NUM_LEDS)
count = of_get_child_count(np);
if (!count || count > NUM_LEDS)
return ERR_PTR(-ENODEV);

tca_leds = devm_kzalloc(&client->dev,
Expand Down

0 comments on commit 7df0326

Please sign in to comment.