Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207754
b: refs/heads/master
c: e1d0fe3
h: refs/heads/master
v: v3
  • Loading branch information
Martin Krause authored and David Woodhouse committed Aug 2, 2010
1 parent 6ebc6c2 commit 8873281
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 24cc7b8a2a48a5707637e918a51ea547efe24892
refs/heads/master: e1d0fe3cddf2306e3ac32569aa152f1909c9b46e
20 changes: 12 additions & 8 deletions trunk/drivers/mtd/mtdconcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,12 @@ static int concat_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
else
size = len;

err = subdev->lock(subdev, ofs, size);

if (err)
break;
if (subdev->lock) {
err = subdev->lock(subdev, ofs, size);
if (err)
break;
} else
err = -EOPNOTSUPP;

len -= size;
if (len == 0)
Expand Down Expand Up @@ -578,10 +580,12 @@ static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
else
size = len;

err = subdev->unlock(subdev, ofs, size);

if (err)
break;
if (subdev->unlock) {
err = subdev->unlock(subdev, ofs, size);
if (err)
break;
} else
err = -EOPNOTSUPP;

len -= size;
if (len == 0)
Expand Down

0 comments on commit 8873281

Please sign in to comment.