Merge tag 'mtd/fixes-for-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull MTD fix from Richard Weinberger:
"A single fix for a possible infinite loop in the cfi_cmdset_0002
driver"

* tag 'mtd/fixes-for-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer

Changed files
+5 -1
drivers
mtd
+5 -1
drivers/mtd/chips/cfi_cmdset_0002.c
··· 1876 1876 continue; 1877 1877 } 1878 1878 1879 - if (time_after(jiffies, timeo) && !chip_ready(map, adr)) 1879 + /* 1880 + * We check "time_after" and "!chip_good" before checking "chip_good" to avoid 1881 + * the failure due to scheduling. 1882 + */ 1883 + if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) 1880 1884 break; 1881 1885 1882 1886 if (chip_good(map, adr, datum)) {