mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
soc: qcom: smem: 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-4-zhangzekun11@huawei.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
454381b523
commit
876b405004
|
|
@ -1186,11 +1186,9 @@ static int qcom_smem_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0);
|
||||
if (hwlock_id < 0) {
|
||||
if (hwlock_id != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "failed to retrieve hwlock\n");
|
||||
return hwlock_id;
|
||||
}
|
||||
if (hwlock_id < 0)
|
||||
return dev_err_probe(&pdev->dev, hwlock_id,
|
||||
"failed to retrieve hwlock\n");
|
||||
|
||||
smem->hwlock = hwspin_lock_request_specific(hwlock_id);
|
||||
if (!smem->hwlock)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user