]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/tegra: sor: Suspend on clock registration failure
authorThierry Reding <treding@nvidia.com>
Fri, 31 Jan 2020 16:59:08 +0000 (17:59 +0100)
committerThierry Reding <treding@nvidia.com>
Fri, 31 Jan 2020 20:29:05 +0000 (21:29 +0100)
Make sure the SOR module is suspenden after we fail to register the SOR
pad output clock.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/sor.c

index f884185c5e9fcb639fb12adb6233465828d702f8..30c96b15d7a321d2f3d75327271a3fead2fb4289 100644 (file)
@@ -3921,15 +3921,16 @@ static int tegra_sor_probe(struct platform_device *pdev)
        if (!sor->clk_pad) {
                char *name;
 
-               err = host1x_client_resume(&sor->client);
-               if (err < 0) {
-                       dev_err(sor->dev, "failed to resume: %d\n", err);
+               name = devm_kasprintf(sor->dev, GFP_KERNEL, "sor%u_pad_clkout",
+                                     sor->index);
+               if (!name) {
+                       err = -ENOMEM;
                        goto remove;
                }
 
-               name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "sor%u_pad_clkout", sor->index);
-               if (!name) {
-                       err = -ENOMEM;
+               err = host1x_client_resume(&sor->client);
+               if (err < 0) {
+                       dev_err(sor->dev, "failed to resume: %d\n", err);
                        goto remove;
                }