mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get
devm_reset_control_get_exclusive() does not return NULL (only valid clock or ERR pointer in case for non-optional get), so simplify the code to drop redundant IS_ERR_OR_NULL(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/20260705172353.119031-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
5ae3dc0788
commit
f4bb5a75bb
|
|
@ -1074,11 +1074,9 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
kproc->reset = devm_reset_control_get_exclusive(cdev, NULL);
|
||||
if (IS_ERR_OR_NULL(kproc->reset)) {
|
||||
ret = PTR_ERR_OR_ZERO(kproc->reset);
|
||||
if (!ret)
|
||||
ret = -ENODEV;
|
||||
dev_err_probe(cdev, ret, "failed to get reset handle\n");
|
||||
if (IS_ERR(kproc->reset)) {
|
||||
ret = dev_err_probe(cdev, PTR_ERR(kproc->reset),
|
||||
"failed to get reset handle\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user