diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2023-01-05 13:33:18 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2023-01-07 12:02:30 +0100 |
commit | a1abf71827834345219adc8e2a361ef2faa0d1bc (patch) | |
tree | 29528187c6343ba3c51ff6a983b3f3fea43af11f /target/linux/realtek/patches-5.10/708-brflood-api.patch | |
parent | 7c574525eef49f56f9e9880a1584b3f8d12bcf60 (diff) | |
download | upstream-a1abf71827834345219adc8e2a361ef2faa0d1bc.tar.gz upstream-a1abf71827834345219adc8e2a361ef2faa0d1bc.tar.bz2 upstream-a1abf71827834345219adc8e2a361ef2faa0d1bc.zip |
kernel: fix bugs added with mac-address-ascii support
1. Check for -EPROBE_DEFER
If it occurs we have to return immediately. Trying other properties
could result in another error and ignoring -EPROBE_DEFER which has a
special meaning.
2. Check for read result
Assuming property->read() success can result in NULL pointer
dereference. It happens e.g. for "mac-address" with NVMEM cell
containing invalid MAC.
3. Simplify code
Don't move cell reading & nvmem_cell_put() into a loop. Simplify loop
code.
Fixes: ecd81de7a5ab ("ath79: add nvmem cell mac-address-ascii support")
Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/realtek/patches-5.10/708-brflood-api.patch')
0 files changed, 0 insertions, 0 deletions