mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
fdf6760cda
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> |
||
---|---|---|
.. | ||
backport-4.9 | ||
backport-4.14 | ||
files | ||
hack-4.9 | ||
hack-4.14 | ||
image | ||
other-files | ||
pending-3.18 | ||
pending-4.9 | ||
pending-4.14 | ||
config-3.18 | ||
config-4.9 | ||
config-4.14 | ||
PATCHES |