openwrt/target/linux/generic/pending-4.9
Mathias Kresin edc2af2be9 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>
(backported from fdf6760cda)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 09:50:47 +01:00
..
100-MIPS-fix-cache-flushing-for-highmem-pages.patch
110-ehci_hcd_ignore_oc.patch
120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch kernel: bump 4.9 to 4.9.145 2018-12-14 13:04:54 +01:00
130-add-linux-spidev-compatible-si3210.patch
131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch kernel: bump 4.9 to 4.9.106 for 18.06 2018-06-07 09:03:05 +02:00
141-jffs2-add-RENAME_EXCHANGE-support.patch kernel: bump 4.9 to 4.9.106 for 18.06 2018-06-07 09:03:05 +02:00
150-bridge_allow_receiption_on_disabled_port.patch
161-mtd-part-add-generic-parsing-of-linux-part-probe.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
170-MIPS-PCI-add-controllers-before-the-specified-head.patch kernel: bump 4.9 to 4.9.138 2018-11-22 10:51:27 +01:00
180-net-phy-at803x-add-support-for-AT8032.patch kernel: re-add patch for AT8032 Ethernet PHY 2018-07-31 05:39:49 +02:00
190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch kernel: bump 4.9 to 4.9.129 2018-09-26 15:55:23 +02:00
201-extra_optimization.patch kernel: bump 4.9 to 4.9.145 2018-12-14 13:04:54 +01:00
203-kallsyms_uncompressed.patch
205-backtrace_module_info.patch
206-mips-disable-vdso.patch
240-remove-unsane-filenames-from-deps_initramfs-list.patch
261-enable_wilink_platform_without_drivers.patch
300-mips_expose_boot_raw.patch kernel: bump 4.9 to 4.9.102 for 18.06 2018-05-24 16:03:58 +02:00
302-mips_no_branch_likely.patch
304-mips_disable_fpu.patch kernel: bump 4.9 to 4.9.102 for 18.06 2018-05-24 16:03:58 +02:00
305-mips_module_reloc.patch mips: fix dynamic ftrace 2018-06-18 21:21:56 +02:00
306-mips_mem_functions_performance.patch
307-mips_highmem_offset.patch
308-mips32r2_tune.patch kernel: bump 4.9 to 4.9.110 for 18.06 2018-07-02 07:06:06 +02:00
310-arm_module_unresolved_weak_sym.patch
330-MIPS-kexec-Accept-command-line-parameters-from-users.patch kernel: bump 4.9 to 4.9.138 2018-11-22 10:51:27 +01:00
332-arc-add-OWRTDTB-section.patch
333-arc-enable-unaligned-access-in-kernel-mode.patch
340-MIPS-mm-remove-mips_dma_mapping_error.patch kernel: MIPS compile out no-op DMA mapping ops where possible 2017-12-08 19:55:17 +01:00
341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch kernel: bump 4.9 to 4.9.102 for 18.06 2018-05-24 16:03:58 +02:00
400-mtd-add-rootfs-split-support.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
401-mtd-add-support-for-different-partition-parser-types.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
403-mtd-hook-mtdsplit-to-Kbuild.patch
404-mtd-add-more-helper-functions.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
411-mtd-partial_eraseblock_write.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
412-mtd-partial_eraseblock_unlock.patch kernel: backport mtd implementation for "compatible" in "partitions" subnode 2018-01-11 12:07:49 +01:00
420-mtd-redboot_space.patch
430-mtd-add-myloader-partition-parser.patch
431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
432-mtd-bcm47xxpart-detect-T_Meter-partition.patch kernel: backport mtd support for subpartitions in DT 2018-07-31 10:14:47 +02:00
440-block2mtd_init.patch
441-block2mtd_probe.patch
450-mtd-m25p80-allow-fallback-from-spi_flash_read-to-reg.patch kernel: m25p80: allow fallback from spi_flash_read to regular SPI transfer 2018-02-26 19:20:06 +01:00
460-mtd-cfi_cmdset_0002-no-erase_suspend.patch
461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch kernel: bump 4.9 to 4.9.102 for 18.06 2018-05-24 16:03:58 +02:00
465-m25p80-mx-disable-software-protection.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
475-mtd-spi-nor-Add-Winbond-w25q128jv-support.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
476-mtd-spi-nor-add-eon-en25q128.patch
477-mtd-add-spi-nor-add-mx25u3235f.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
480-mtd-set-rootfs-to-be-root-dev.patch
490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch kernel: improve ubi auto attach code readability 2018-12-18 09:50:47 +01:00
491-ubi-auto-create-ubiblock-device-for-rootfs.patch kernel: bump 4.9 to 4.9.82 2018-02-18 02:59:57 +01:00
492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch kernel: bump 4.9 to 4.9.82 2018-02-18 02:59:57 +01:00
494-mtd-ubi-add-EOF-marker-support.patch kernel/4.9: add missing newline character to UBI messages 2017-12-24 09:03:01 +01:00
530-jffs2_make_lzma_available.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
532-jffs2_eofdetect.patch
551-ubifs-fix-default-compression-selection.patch
600-netfilter_conntrack_flush.patch
610-netfilter_match_bypass_default_checks.patch kernel: bump 4.9 to 4.9.117 for 18.06 2018-08-06 07:30:32 +02:00
611-netfilter_match_bypass_default_table.patch
612-netfilter_match_reduce_memory_access.patch
613-netfilter_optional_tcp_window_check.patch
616-net_optimize_xfrm_calls.patch kernel: bump 4.9 to 4.9.63 2017-11-22 20:45:52 +01:00
620-net_sched-codel-do-not-defer-queue-length-update.patch kernel: merge a pending fix for HFSC warnings/slowdowns (fixes FS#1136) 2018-03-11 08:58:53 +01:00
630-packet_socket_type.patch kernel: bump 4.9 to 4.9.124 2018-08-28 23:06:47 +02:00
655-increase_skb_pad.patch kernel: bump 4.9 to 4.9.134 2018-10-19 10:00:48 +02:00
666-Add-support-for-MAP-E-FMRs-mesh-mode.patch kernel: bump 4.9 to 4.9.134 2018-10-19 10:00:48 +02:00
670-ipv6-allow-rejecting-with-source-address-failed-policy.patch kernel: bump 4.9 to 4.9.143 2018-12-13 13:28:41 +01:00
671-net-provide-defines-for-_POLICY_FAILED-until-all-cod.patch
680-NET-skip-GRO-for-foreign-MAC-addresses.patch kernel: bump 4.9 to 4.9.143 2018-12-13 13:28:41 +01:00
681-NET-add-of_get_mac_address_mtd.patch
701-phy_extension.patch kernel: bump 4.9 to 4.9.96 2018-04-26 08:53:54 +02:00
703-phy-add-detach-callback-to-struct-phy_driver.patch kernel: bump 4.9 to 4.9.63 2017-11-22 20:45:52 +01:00
734-net-phy-at803x-allow-to-configure-via-pdata.patch kernel: re-add patch for AT8032 Ethernet PHY 2018-07-31 05:39:49 +02:00
735-net-phy-at803x-fix-at8033-sgmii-mode.patch kernel: remove duplicate #define's in at803x Ethernet PHY driver 2018-07-31 05:42:35 +02:00
810-pci_disable_common_quirks.patch kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
811-pci_disable_usb_common_quirks.patch kernel: update 4.9 to 4.9.49 2017-09-11 01:56:14 +02:00
821-usb-Remove-annoying-warning-about-bogus-URB.patch
831-ledtrig_netdev.patch
834-ledtrig-libata.patch kernel: bump 4.9 to 4.9.117 for 18.06 2018-08-06 07:30:32 +02:00
890-uart_optional_sysrq.patch kernel: bump 4.9 to 4.9.117 for 18.06 2018-08-06 07:30:32 +02:00
920-mangle_bootargs.patch kernel: bump 4.9 to 4.9.96 2018-04-26 08:53:54 +02:00
0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch kernel: bump 4.9 to 4.9.119 2018-08-10 18:43:59 +02:00