Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333817
b: refs/heads/master
c: 0224936
h: refs/heads/master
i:
  333815: 51b1564
v: v3
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent 8206b32 commit 7ef68ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 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: ec0341b3b7817a5e8ebcf26091dde28dce2d7821
refs/heads/master: 02249369352879343337ee63b45dee1e1cfc2550
16 changes: 2 additions & 14 deletions trunk/drivers/media/platform/soc_camera/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1529,12 +1529,11 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev)
{
struct soc_camera_link *icl = pdev->dev.platform_data;
struct soc_camera_device *icd;
int ret;

if (!icl)
return -EINVAL;

icd = kzalloc(sizeof(*icd), GFP_KERNEL);
icd = devm_kzalloc(&pdev->dev, sizeof(*icd), GFP_KERNEL);
if (!icd)
return -ENOMEM;

Expand All @@ -1543,19 +1542,10 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev)
icd->pdev = &pdev->dev;
platform_set_drvdata(pdev, icd);

ret = soc_camera_device_register(icd);
if (ret < 0)
goto escdevreg;

icd->user_width = DEFAULT_WIDTH;
icd->user_height = DEFAULT_HEIGHT;

return 0;

escdevreg:
kfree(icd);

return ret;
return soc_camera_device_register(icd);
}

/*
Expand All @@ -1572,8 +1562,6 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev)

list_del(&icd->list);

kfree(icd);

return 0;
}

Expand Down

0 comments on commit 7ef68ca

Please sign in to comment.