Rafał Miłecki a1abf71827 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>
2023-01-07 12:02:30 +01:00
..
2022-11-27 13:18:29 +01:00
2022-12-24 15:24:18 +01:00
2022-12-23 19:44:14 +01:00
2023-01-03 23:55:45 +01:00
2022-12-23 19:44:20 +01:00
2023-01-07 01:30:31 +01:00
2023-01-07 01:30:31 +01:00
2022-12-23 19:44:20 +01:00
2023-01-07 01:30:31 +01:00
2022-12-23 19:44:20 +01:00
2022-12-23 19:44:22 +01:00
2023-01-03 23:55:45 +01:00
2022-12-14 18:53:39 +02:00
2023-01-07 01:30:31 +01:00
2022-12-23 19:44:21 +01:00
2022-12-12 09:06:17 +01:00
2023-01-03 20:56:01 +01:00