From patchwork Thu Aug 3 02:18:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 13339136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BD7BC001DF for ; Thu, 3 Aug 2023 02:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbjHCCVW (ORCPT ); Wed, 2 Aug 2023 22:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjHCCVV (ORCPT ); Wed, 2 Aug 2023 22:21:21 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0FFB2 for ; Wed, 2 Aug 2023 19:21:20 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RGXbm4GlGzVk1Z; Thu, 3 Aug 2023 10:19:32 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 10:21:18 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 10:21:17 +0800 From: Yang Yingliang To: CC: , , , Subject: [PATCH -next] media: davinci: vpif_capture: fix error return code in vpif_probe() Date: Thu, 3 Aug 2023 10:18:35 +0800 Message-ID: <20230803021835.3740766-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Set error return code, when get platform data failed. Fixes: b4a4547371b9 ("media: davinci: Init async notifier after registering V4L2 device") Signed-off-by: Yang Yingliang Reviewed-by: Lad Prabhakar --- drivers/media/platform/ti/davinci/vpif_capture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c index bf5330b6fcd5..99fae8830c41 100644 --- a/drivers/media/platform/ti/davinci/vpif_capture.c +++ b/drivers/media/platform/ti/davinci/vpif_capture.c @@ -1644,6 +1644,7 @@ static __init int vpif_probe(struct platform_device *pdev) pdev->dev.platform_data = vpif_capture_get_pdata(pdev, &vpif_obj.v4l2_dev); if (!pdev->dev.platform_data) { + err = -EINVAL; dev_warn(&pdev->dev, "Missing platform data. Giving up.\n"); goto vpif_unregister; }