Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3088337imm; Sun, 10 Jun 2018 08:13:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI73RncNdiaaUgM7/6IuLJ1GGLj9wrEMnIL1eucTqmSlvYtV/u0TR+MrJ0dTpKiJFePfhEf X-Received: by 2002:a17:902:be0d:: with SMTP id r13-v6mr10829478pls.299.1528643628970; Sun, 10 Jun 2018 08:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528643628; cv=none; d=google.com; s=arc-20160816; b=ee5TpiqeiWMt8PfBKcquSBF+DmfQw4aKvructvEcclELb3NT6E2zJO8LCH72OMAnz4 yi9DDaFb7+kbKVodZMyIStrRs36rk+b9883Gvzw+7GqUHhrjQXTMCC3vpC+MpA3lyoyV Y2AWoTS3MfKTIeBXlTIq5mVFVvvt1ZDMurOyav4oWTV3hpjR5zn9uoT67xV9Iqpmlo9v aYD653pYoF+0zmrOFMoXEEl1G0Un0YZRut3y2R/+5lZ1P8FXeNIydgPECRAUteAUazOj 2ePAb4ATdmNfSUmLIqxIsiG9kyAyV8heg6aMBWj5Rb3qnao8q29i7oJxchaTpFD8JBiG Oedg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NYHRAxsKkYO7eAWOW7YLFhp3ylDmRW866qkvsFq6jaA=; b=SRFbo+RG2FjxrBKOZeAz4ou03vxVcWdzrpTxJ+8z27ES8RM2v5PpWqwCIW4kacEXB7 yg/WY4m0chLWZuL4/td7SQ/+hlFDgKPwnUgPRMdVzql3Ga66+Th83qW1VxUTPIkAMjGW TD5fCRuKQ7Xq05s0S/Da7C45No+MuxfkfkAqnXsbS5MfF/e/ggbsk3Aa9Y8pODy/bTDn /9pfBRCFn62WVpkX1qrWDoOeqgBLLI9mqP8mG8zRlDzEHvsHVV49z2YjJBXEPS2/PVMV F4ehZ1uso0wSiL5oArlOCyypuyBxcGppp3IK1gCg+yoNqTMbMxNIhDWnKme6P5RpADL0 YQow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p61-v6si62001327plb.472.2018.06.10.08.13.20; Sun, 10 Jun 2018 08:13:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624AbeFJO4Z (ORCPT + 99 others); Sun, 10 Jun 2018 10:56:25 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21892 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbeFJO4V (ORCPT ); Sun, 10 Jun 2018 10:56:21 -0400 X-IronPort-AV: E=Sophos;i="5.49,498,1520895600"; d="scan'208";a="331181269" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 10 Jun 2018 16:56:19 +0200 From: Julia Lawall To: Tomi Valkeinen Cc: kernel-janitors@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] omapfb: encoder-tpd12s015: fix error return code Date: Sun, 10 Jun 2018 16:24:13 +0200 Message-Id: <1528640655-18948-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return an error code on failure. Problem found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c | 12 +++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c index 80dc473..2b58bfc 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c @@ -240,22 +240,28 @@ static int tpd_probe(struct platform_device *pdev) gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0, GPIOD_OUT_LOW); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->ct_cp_hpd_gpio = gpio; gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1, GPIOD_OUT_LOW); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->ls_oe_gpio = gpio; gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2, GPIOD_IN); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->hpd_gpio = gpio;