summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/kapi.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-11 15:03:29 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 15:58:53 +0200
commit503990ebb21e5aabe497a3eb1d39bef0bbc1be6f (patch)
tree9236566c401828cedc2785cabbf4d85d5f26d215 /drivers/mtd/ubi/kapi.c
parentUBI: cleanup usage of try_module_get (diff)
downloadlinux-503990ebb21e5aabe497a3eb1d39bef0bbc1be6f.tar.xz
linux-503990ebb21e5aabe497a3eb1d39bef0bbc1be6f.zip
UBI: remove unneeded error checks
Pointed to by viro. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r--drivers/mtd/ubi/kapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 78cae4940875..4a458e83e4e9 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -38,9 +38,8 @@ int ubi_get_device_info(int ubi_num, struct ubi_device_info *di)
const struct ubi_device *ubi;
if (ubi_num < 0 || ubi_num >= UBI_MAX_DEVICES ||
- !ubi_devices[ubi_num]) {
+ !ubi_devices[ubi_num])
return -ENODEV;
- }
ubi = ubi_devices[ubi_num];
di->ubi_num = ubi->ubi_num;