soc: qcom: smsm: Use dev_err_probe()
Subsystems (2)
PATCH 1/1 soc: qcom: smsm: Use dev_err_probe()
From: Ye Xingchen <[email protected]>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by Ye Xingchen <[email protected]>
--- drivers/soc/qcom/smsm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/soc/qcom/smsm.c +4 -5
@@ -452,11 +452,10 @@ static int smsm_get_size_info(struct qcom_smsm *smsm) } *info; info =qcom_smem_get (QCOM_SMEM_HOST_ANY ,SMEM_SMSM_SIZE_INFO , &size); -if (IS_ERR (info) &&PTR_ERR (info) != -ENOENT ) { -if (PTR_ERR (info) != -EPROBE_DEFER ) -dev_err (smsm->dev,"unable to retrieve smsm size info\n" ); -return PTR_ERR (info); - }else if (IS_ERR (info) || size !=sizeof (*info)) { +if (IS_ERR (info) &&PTR_ERR (info) != -ENOENT ) +return dev_err_probe (smsm->dev,PTR_ERR (info), +"unable to retrieve smsm size info\n" ); +else if (IS_ERR (info) || size !=sizeof (*info)) {dev_warn (smsm->dev,"no smsm size info, using defaults\n" ); smsm->num_entries =SMSM_DEFAULT_NUM_ENTRIES ; smsm->num_hosts =SMSM_DEFAULT_NUM_HOSTS ;
Signature · 1 line
2.25.1
Quoted 5 lines · On Fri, 24 Mar 2023 10:18:53 +0800 (CST), [email protected] wrote:
From: Ye Xingchen <[email protected]>
Replace the open-code with
dev_err_probe()to simplify the code.
Applied, thanks!
[1/1] soc: qcom: smsm: Use dev_err_probe()
commit: 74f9d27ac7591e0df05c85ca5eb538253f39919d
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>