Skip to content
Commit b3edc346 authored by Stanley Chang's avatar Stanley Chang Committed by Chanwoo Choi
Browse files

extcon: realtek: add the error handler for nvmem_cell_read

There are following smatch warning:
drivers/extcon/extcon-rtk-type-c.c:905 __updated_type_c_parameter_by_efuse()
error: 'buf' dereferencing possible ERR_PTR()

The nvmem_cell_read may fail to read. So, driver must handle failure cases.

Link: https://lore.kernel.org/all/20231016053510.28881-1-stanley_chang@realtek.com/

Fixes: 8a590d73

 ("extcon: add Realtek DHC RTD SoC Type-C driver")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a469dd51-f5d5-4e8f-ba36-6c7cea046fb8@moroto.mountain/
Signed-off-by: default avatarStanley Chang <stanley_chang@realtek.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent da886ba8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment