From patchwork Sun Oct 30 01:53:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9404315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5C5BE60587 for ; Sun, 30 Oct 2016 01:54:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 325D029129 for ; Sun, 30 Oct 2016 01:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22EAD29131; Sun, 30 Oct 2016 01:54:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A541229129 for ; Sun, 30 Oct 2016 01:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754535AbcJ3Bxc (ORCPT ); Sat, 29 Oct 2016 21:53:32 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33099 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbcJ3Bxc (ORCPT ); Sat, 29 Oct 2016 21:53:32 -0400 Received: by mail-pf0-f193.google.com with SMTP id a136so1665002pfa.0 for ; Sat, 29 Oct 2016 18:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nzgwHGkYSW4VAQSM4vdS5HUZq6G52mAtklA1RAgyTzU=; b=QA5KeO/BQBmgCE5Crqt5x5dc92k6q9U60jJxIf4QmLfa0E8iEYuSzCSH4+uDw/whkg ygHWa5z6Tjzde91/dAveaL1uYMClaiOmqM1e2SibWA5Ww+wDfYwpJM/TWt0che2211oM g3DnIl5TZpZrqp9XRn44pzmZUH+gEyHyTPFhWMakJAOdav+8nKTDCZZE2giQFGVuG/9s LXwWyKEDaGTiO+vnisj83Mxq6eSaHIYG4qCWmnFX5K1zFSDAlG339PEhkm6uRuHWfF2G Oe2SzS8osm8c+eIT6sHvb6ADvIpCC2mXMc1wssatrgiqbYOcVFRObydsKLVDlpprGWDW rz6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nzgwHGkYSW4VAQSM4vdS5HUZq6G52mAtklA1RAgyTzU=; b=R5I4zUk33mMRhLgzrN6RmvriVU7/CuVtRhN4DhrAA5UePOMt4cu7y8WbdFeY13bCV+ Hui5BjDUlDskgIpMLlrjRNR02ULWxttJFRHHKvhogwK7e4MOv1Y3+LNL0LtY2VX2yOPr gX0muHnvmodQGFM0/WQfuyFyxDtBPV/wG2ugx0gaJaklmb6q/nu0EMZi5SzSoxCTvuPD U4ddU8BLxkcgmEuW8yzz2lzxp8tvihF4pOTf3KavDE7iJPrV9p0HHOaWUSEdiVWDJgKU fpqHTl1/BU6PFurUI4cfpA8SvfF1PKFTS+cTSi5XcO+69lRxqLUmsK8eqqzjYqhTaUkR w1vQ== X-Gm-Message-State: ABUngvfJBFHWbtF2uPNnd454CzJXDpcoaVxogx5X6cJ9rRVTOXMzZRncBBbpG4KJUjvxXA== X-Received: by 10.98.57.144 with SMTP id u16mr1263010pfj.142.1477792411406; Sat, 29 Oct 2016 18:53:31 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id bx5sm27587279pad.6.2016.10.29.18.53.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 18:53:30 -0700 (PDT) From: Wei Yongjun To: Patrice Chotard , Mauro Carvalho Chehab Cc: Wei Yongjun , linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-media@vger.kernel.org Subject: [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe() Date: Sun, 30 Oct 2016 01:53:10 +0000 Message-Id: <1477792390-24533-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: Patrice Chotard --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 42b123f..69d9a16 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -813,6 +813,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) i2c_bus = of_parse_phandle(child, "i2c-bus", 0); if (!i2c_bus) { dev_err(&pdev->dev, "No i2c-bus found\n"); + ret = -ENODEV; goto err_clk_disable; } tsin->i2c_adapter = @@ -820,6 +821,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) if (!tsin->i2c_adapter) { dev_err(&pdev->dev, "No i2c adapter found\n"); of_node_put(i2c_bus); + ret = -ENODEV; goto err_clk_disable; } of_node_put(i2c_bus);