ramips: fix kernel oops in `mt7621_nfc_write_page_hwecc`
authorAnton Ryzhov <anton@ryzhov.me>
Sun, 1 Nov 2020 15:06:26 +0000 (16:06 +0100)
committerChuanhong Guo <gch981213@gmail.com>
Wed, 4 Nov 2020 14:08:11 +0000 (22:08 +0800)
commitdf469befdc4c13d260b99f3a1e15bc418a429020
tree55afe2c535f2909381b6761c2a8d29f0cc0b0150
parentbe09c5a3cd6535ccfc6b1628546c0416d94bd131
ramips: fix kernel oops in `mt7621_nfc_write_page_hwecc`

`mt7621_nfc_write_page_hwecc` may be called with `buf=NULL`, but
`mt7621_nfc_check_empty_page` always tries to read it.
That caused Oops:
`Unable to handle kernel paging request at virtual address 00000000`

Fixes: FS#3416
Signed-off-by: Anton Ryzhov <anton@ryzhov.me>
target/linux/ramips/patches-5.4/0300-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch