Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225962
b: refs/heads/master
c: a4257af
h: refs/heads/master
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed Dec 20, 2010
1 parent 45e70a4 commit 702e516
Show file tree
Hide file tree
Showing 2 changed files with 19 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: ef6c84454f8567d4968c210d7d194fb711ed3739
refs/heads/master: a4257af5b0c5479bb81597579841e9daaeccd7f6
21 changes: 18 additions & 3 deletions trunk/drivers/pcmcia/pxa2xx_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,16 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
struct clk *clk;

ops = (struct pcmcia_low_level *)dev->dev.platform_data;
if (!ops)
return -ENODEV;
if (!ops) {
ret = -ENODEV;
goto err0;
}

if (cpu_is_pxa320() && ops->nr > 1) {
dev_err(&dev->dev, "pxa320 supports only one pcmcia slot");
ret = -EINVAL;
goto err0;
}

clk = clk_get(&dev->dev, NULL);
if (!clk)
Expand Down Expand Up @@ -316,7 +324,7 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)

ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret)
break;
goto err1;
}

if (ret) {
Expand All @@ -329,6 +337,13 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
dev_set_drvdata(&dev->dev, sinfo);
}

return 0;

err1:
while (--i >= 0)
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
err0:
return ret;
}

Expand Down

0 comments on commit 702e516

Please sign in to comment.