mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
soc: qcom: rpmh-rsc: 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-2-zhangzekun11@huawei.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
e81ee454d7
commit
454381b523
|
|
@ -1045,12 +1045,9 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
|
|||
* do. To avoid adding this check to our children we'll do it now.
|
||||
*/
|
||||
ret = cmd_db_ready();
|
||||
if (ret) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Command DB not available (%d)\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Command DB not available\n");
|
||||
|
||||
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
|
||||
if (!drv)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user