+5
-1
drivers/mtd/chips/cfi_cmdset_0002.c
+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)) {