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: 9404317 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 2F4CA60587 for ; Sun, 30 Oct 2016 01:55:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 119A429131 for ; Sun, 30 Oct 2016 01:55:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04FFA29133; Sun, 30 Oct 2016 01:55:48 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 91CF029131 for ; Sun, 30 Oct 2016 01:55:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0fJu-0006kv-F6; Sun, 30 Oct 2016 01:53:58 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0fJo-0006jN-VG for linux-arm-kernel@lists.infradead.org; Sun, 30 Oct 2016 01:53:53 +0000 Received: by mail-pf0-x244.google.com with SMTP id a136so1665004pfa.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=UTLOZVszbSM2bm00F0ccEzTVo9VaTg/Gwtpd+H6Gly1sMbbToBa4NpW0f4lH5kvndQ cKaIFk6/jQhb/UZu5MwytKuYqwFVoKBuDZI1AbZxbUJ4GZC9SbC1pe/OWLcfUqygXq6f V8zPIyDMt/8iR429srAAkYS8Yrv5GjM5vfBg8uNPWHfF1sTHpc1MK8aESLqnV9ZeJ1kq 0yxFIJEV43KFykyU5qfantuIxCAoJkIc+DJ8bPZwf5P7fZcy5A2+4IOD5VsSPrI8/Y// wb6wUlQJSKXSopx9fl+m0lpWc/HkxCwGY0JvCj8kyqy9y61lmCN/pFBEXSME5/OY+/YJ usnA== X-Gm-Message-State: ABUngvdmsbnZBM2NDHcOv+c+VHemRjyM+Y+QxbI+1MEsSPz/kV4XE9y6SJX16GSSXfrdDA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161029_185353_066700_4B369D69 X-CRM114-Status: GOOD ( 10.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Yongjun , kernel@stlinux.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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(+) 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);