Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddd7c36e authored by Zhiqiang Tu's avatar Zhiqiang Tu
Browse files

clk: qcom: use devm_*() API for virtio clock provider registration



Use devm_*() API because resource will be automatically released at device
exit.

Change-Id: Ide9c77e3e938b780daed225cd14fd45410e80e86
Signed-off-by: default avatarZhiqiang Tu <ztu@codeaurora.org>
parent 4afb6696
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "%s: " fmt, __func__
@@ -553,7 +553,7 @@ static int virtio_clk_probe(struct virtio_device *vdev)
		}
	}

	ret = of_clk_add_hw_provider(vdev->dev.parent->of_node,
	ret = devm_of_clk_add_hw_provider(vdev->dev.parent,
			of_clk_hw_virtio_get, vclk);
	if (ret) {
		dev_err(&vdev->dev, "failed to add clock provider\n");
@@ -577,7 +577,6 @@ static int virtio_clk_probe(struct virtio_device *vdev)
	return 0;

err_rst_register:
	of_clk_del_provider(vdev->dev.parent->of_node);
err_clk_register:
err_kcalloc:
err_find_desc: