Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252501
b: refs/heads/master
c: 52534f2
h: refs/heads/master
i:
  252499: 1705040
v: v3
  • Loading branch information
Wanlong Gao authored and David Woodhouse committed May 25, 2011
1 parent 622be25 commit e55688e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: 7c802fbd541448accec7bbc0e72ef38693a29593
refs/heads/master: 52534f2dba5d033c0c33e515faa2767d7e8e986a
13 changes: 2 additions & 11 deletions trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ int __get_mtd_device(struct mtd_info *mtd)
return -ENODEV;

if (mtd->get_device) {

err = mtd->get_device(mtd);

if (err) {
Expand Down Expand Up @@ -571,21 +570,13 @@ struct mtd_info *get_mtd_device_nm(const char *name)
if (!mtd)
goto out_unlock;

if (!try_module_get(mtd->owner))
err = __get_mtd_device(mtd);
if (err)
goto out_unlock;

if (mtd->get_device) {
err = mtd->get_device(mtd);
if (err)
goto out_put;
}

mtd->usecount++;
mutex_unlock(&mtd_table_mutex);
return mtd;

out_put:
module_put(mtd->owner);
out_unlock:
mutex_unlock(&mtd_table_mutex);
return ERR_PTR(err);
Expand Down

0 comments on commit e55688e

Please sign in to comment.