Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271291
b: refs/heads/master
c: 7963e21
h: refs/heads/master
i:
  271289: c6127a0
  271287: 128108d
v: v3
  • Loading branch information
Laurent Pinchart committed Aug 19, 2011
1 parent e1414c6 commit 91e024e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: f0a260fef6943c60bae65ae52fc4fa52e7f078b1
refs/heads/master: 7963e21e50c8e712553347f900f0d0afaf5be2aa
18 changes: 8 additions & 10 deletions trunk/drivers/video/sh_mobile_meram.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,24 +410,22 @@ static int sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
xres, yres, (!pixelformat) ? "yuv" : "rgb",
base_addr_y, base_addr_c);

mutex_lock(&priv->lock);

/* we can't handle wider than 8192px */
if (xres > 8192) {
dev_err(&pdev->dev, "width exceeding the limit (> 8192).");
error = -EINVAL;
goto err;
}

if (priv->used_meram_cache_regions + 2 > SH_MOBILE_MERAM_ICB_NUM) {
dev_err(&pdev->dev, "no more ICB available.");
error = -EINVAL;
goto err;
return -EINVAL;
}

/* do we have at least one ICB config? */
if (cfg->icb[0].marker_icb < 0 || cfg->icb[0].cache_icb < 0) {
dev_err(&pdev->dev, "at least one ICB is required.");
return -EINVAL;
}

mutex_lock(&priv->lock);

if (priv->used_meram_cache_regions + 2 > SH_MOBILE_MERAM_ICB_NUM) {
dev_err(&pdev->dev, "no more ICB available.");
error = -EINVAL;
goto err;
}
Expand Down

0 comments on commit 91e024e

Please sign in to comment.