diff options
author | Artem Bityutskiy <dedekind@infradead.org> | 2006-10-11 13:52:47 +0200 |
---|---|---|
committer | Artem Bityutskiy <dedekind@infradead.org> | 2006-11-29 16:06:38 +0100 |
commit | 9c74034f8fc5d93fbe5656421cbbdc4c76ddda28 (patch) | |
tree | e5a205e124c0e42899743d765598f82a228156c2 /drivers/mtd/maps/nettel.c | |
parent | [MTD] add get and put methods (diff) | |
download | linux-9c74034f8fc5d93fbe5656421cbbdc4c76ddda28.tar.xz linux-9c74034f8fc5d93fbe5656421cbbdc4c76ddda28.zip |
[MTD] return error code from get_mtd_device()
get_mtd_device() returns NULL in case of any failure. Teach it to return an
error code instead. Fix all users as well.
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
Diffstat (limited to 'drivers/mtd/maps/nettel.c')
-rw-r--r-- | drivers/mtd/maps/nettel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c index f9e8e5bcbc33..528e523245c2 100644 --- a/drivers/mtd/maps/nettel.c +++ b/drivers/mtd/maps/nettel.c @@ -20,6 +20,7 @@ #include <linux/mtd/partitions.h> #include <linux/mtd/cfi.h> #include <linux/reboot.h> +#include <linux/err.h> #include <linux/kdev_t.h> #include <linux/root_dev.h> #include <asm/io.h> @@ -178,7 +179,7 @@ int nettel_eraseconfig(void) init_waitqueue_head(&wait_q); mtd = get_mtd_device(NULL, 2); - if (mtd) { + if (!IS_ERR(mtd)) { nettel_erase.mtd = mtd; nettel_erase.callback = nettel_erasecallback; nettel_erase.callback = NULL; |