[PATCH 2/2] drm/tegra: Use an error code directly in tegra_output_probe()

SF Markus Elfring elfring at users.sourceforge.net
Tue Oct 24 17:35:23 UTC 2017


From: Markus Elfring <elfring at users.sourceforge.net>
Date: Tue, 24 Oct 2017 19:21:24 +0200

Return the code "-EPROBE_DEFER" directly in one if branch
without assigning it to the local variable "err" before.

Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
 drivers/gpu/drm/tegra/output.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 1e0915e213b4..a9b458f22de6 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -115,9 +115,8 @@ int tegra_output_probe(struct tegra_output *output)
 	if (ddc) {
 		output->ddc = of_find_i2c_adapter_by_node(ddc);
 		if (!output->ddc) {
-			err = -EPROBE_DEFER;
 			of_node_put(ddc);
-			return err;
+			return -EPROBE_DEFER;
 		}
 
 		of_node_put(ddc);
-- 
2.14.3



More information about the dri-devel mailing list