diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-11 16:03:29 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-18 16:58:53 +0300 |
commit | 503990ebb21e5aabe497a3eb1d39bef0bbc1be6f (patch) | |
tree | 9236566c401828cedc2785cabbf4d85d5f26d215 /drivers/mtd/ubi/kapi.c | |
parent | 2db61c95c03d08bb885c87a816540e75190c924a (diff) |
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.c | 3 |
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; |