soc: qcom: smp2p: Simplify code with dev_err_probe()
Use dev_err_probe() directly in the driver probe phase, and we don't need to judge if the error code is not equal to -EPROBE_DEFER. This can simplify the code a bit. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240909122921.12627-5-zhangzekun11@huawei.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>pull/1083/head
parent
876b405004
commit
cd8ec43758
|
|
@ -467,12 +467,9 @@ static int qcom_smp2p_alloc_outbound_item(struct qcom_smp2p *smp2p)
|
|||
int ret;
|
||||
|
||||
ret = qcom_smem_alloc(pid, smem_id, sizeof(*out));
|
||||
if (ret < 0 && ret != -EEXIST) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(smp2p->dev,
|
||||
"unable to allocate local smp2p item\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0 && ret != -EEXIST)
|
||||
return dev_err_probe(smp2p->dev, ret,
|
||||
"unable to allocate local smp2p item\n");
|
||||
|
||||
out = qcom_smem_get(pid, smem_id, NULL);
|
||||
if (IS_ERR(out)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue