openwrtv3/target/linux/generic
Mathias Kresin fdf6760cda kernel: improve ubi auto attach code readability
Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.

The early return on failed open of the mtd device and mismatching mtd
type allows to get rid of one level of indentation. By jumping to the
cleanup code, a refcount bug is fixed for the wrong flash type condition.

While at it, make clear that we only check for the UBI magic if the read
from flash was successful.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-07-24 22:24:21 +02:00
..
backport-4.9 kernel: backport a change to 4.9 which disables overly aggressive warnings on gcc 8 2018-07-22 17:16:35 +02:00
backport-4.14 kernel: backport fixes for GCC 8 errors in syscall definitions 2018-07-22 17:16:30 +02:00
files kernel: rtl8366-smi: add Realtek switch management via mii-bus 2018-06-25 20:52:18 +02:00
hack-4.9 kernel: adjust bridge port isolate patch to match upstream attribute naming 2018-07-11 20:59:05 +02:00
hack-4.14 kernel: replace bridge port isolate hack with upstream patch backport on 4.14 2018-07-11 20:59:05 +02:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
other-files kernel: move initramfs's init script out of base-files 2017-04-04 14:06:40 +02:00
pending-3.18 kernel: adjust bridge port isolate patch to match upstream attribute naming 2018-07-11 20:59:05 +02:00
pending-4.9 kernel: improve ubi auto attach code readability 2018-07-24 22:24:21 +02:00
pending-4.14 kernel: improve ubi auto attach code readability 2018-07-24 22:24:21 +02:00
config-3.18 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
config-4.9 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
config-4.14 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
PATCHES kernel: update PATCHES with a stricter policy 2013-07-09 20:52:07 +00:00