Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329208
b: refs/heads/master
c: 06455bb
h: refs/heads/master
v: v3
  • Loading branch information
Srinivas Kandagatla authored and Rob Herring committed Oct 1, 2012
1 parent 297b284 commit 4397e13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 9c19761a7ecdc86abb2fba0feb81e8952eccc1f1
refs/heads/master: 06455bbcab76e5f5225de5f38ab948d37a1c3587
7 changes: 4 additions & 3 deletions trunk/drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
return ERR_PTR(-EINVAL);
}

for_each_child_of_node(slave_np, data_np)
if (!strcmp(data_np->name, "controller-data"))
break;
data_np = of_get_child_by_name(slave_np, "controller-data");
if (!data_np) {
dev_err(&spi->dev, "child node 'controller-data' not found\n");
return ERR_PTR(-EINVAL);
Expand All @@ -847,6 +845,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
if (!cs) {
dev_err(&spi->dev, "could not allocate memory for controller"
" data\n");
of_node_put(data_np);
return ERR_PTR(-ENOMEM);
}

Expand All @@ -855,11 +854,13 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
dev_err(&spi->dev, "chip select gpio is not specified or "
"invalid\n");
kfree(cs);
of_node_put(data_np);
return ERR_PTR(-EINVAL);
}

of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);
cs->fb_delay = fb_delay;
of_node_put(data_np);
return cs;
}

Expand Down

0 comments on commit 4397e13

Please sign in to comment.