From: Thierry Reding Date: Fri, 31 Jan 2020 16:59:08 +0000 (+0100) Subject: drm/tegra: sor: Suspend on clock registration failure X-Git-Tag: v5.6-rc1~34^2~2^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=a5127a2dbe95dd72b6a21c98dee0857511f30357;p=linux.git drm/tegra: sor: Suspend on clock registration failure Make sure the SOR module is suspenden after we fail to register the SOR pad output clock. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index f884185c5e9f..30c96b15d7a3 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -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; }