Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2399439rdb; Fri, 8 Dec 2023 07:08:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEApdVuKZzRfa7hC9o50aIYvBTyZ+f3w0ZNOtzKkwQ0wz8tibjOAqbWBSslP+KyMYvFewz X-Received: by 2002:a05:6a00:1408:b0:6cd:fb72:1262 with SMTP id l8-20020a056a00140800b006cdfb721262mr139466pfu.9.1702048123911; Fri, 08 Dec 2023 07:08:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702048123; cv=none; d=google.com; s=arc-20160816; b=o3eFy0F0cRTDT/VgWDjr4yP1K0GUdJz0QNeTumfaEiXfDFINaJxI6xhAFYrxtqOB1A nSVdoyloS7kx1W7Mv38sg/bXoSx85sc4ZZalxrfYeTVJcS1UdjdfI71/V/fdSU2L1Pd0 eaWE1tr5cvvtAKrDrR/dDP4NTk3eKYfX7vMWAlLpXIiMRLJEhVjWuTVRm2nyxb9Z5IEG agAmpGKcP1dO5A0/Nnwvmyl/AJI71EVZd8uAm0D/a6mY7V4kq4lx8Q4/p1t4gqOydWRS Dkf3WSaQGzalX5za2rSmSe5P3ITD8SUFwmedADrKFvH9ncvb1WMOKGEgYF3NOH4fcNX9 QxAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xei5QZR7EI9E2ALHhuyyu7xvQSP/1ScbuB7sw/eepHw=; fh=5WFlYumxFb4YMTIyFXnieMfGzo3YjRfO3j2f2Wqiw4A=; b=EAprePEgNJbNhSs5bZfgR0O4F1nlHY3lQP0lv1SUBSLbZYRXGL1M4tvLqdFdx/seL+ tXrz3urgi4vZ/+jVdIOXE5WwNyLlN/cpMoF/04wQIRXxVgaZJ9nXY1hUzq+BQGYTaw2K vWPOAADW+XMNlutbK6ai4mcDaBlp+H204ELhlc6KBWpBWzfC8h96HQU2lWKXN+VP4dQY K+5ifahgpX0lA8Ktfxo+CBV92wycUtrn2kzEOyT3OfPSrnmKqDLRkpUyIUBYSrSYhA3L 14onPM+JOWkTru++2AxbjALNB6YduOYgqY1pAjYDRjVd7exGGtOplQTtIoeqjO79BZM3 Yn4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=gAuvzIPL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g6-20020a056a0023c600b006cd82b4d0c4si1685206pfc.89.2023.12.08.07.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 07:08:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=gAuvzIPL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id ABB7D837BE5C; Fri, 8 Dec 2023 07:08:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574187AbjLHPIK (ORCPT + 99 others); Fri, 8 Dec 2023 10:08:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574160AbjLHPIG (ORCPT ); Fri, 8 Dec 2023 10:08:06 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 732FB122; Fri, 8 Dec 2023 07:08:12 -0800 (PST) Received: from umang.jain (unknown [103.251.226.108]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B5801EBA; Fri, 8 Dec 2023 16:07:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1702048049; bh=nrEAdhHZwA2L0AvxJ6FGfgqEfXwThQSUE+QCVNTuuhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gAuvzIPLzZbXJAQOVLdFaCDYd4M7E8B4M6iDC4DeTXNdPI1Mc+WFc8omlFcUDmeeJ tuvNgP8E5C3mjtX+vsWmKDvyeLDlRNgHMXfzonSj+Zgw/A+PqS3K7h9oV6LV01NEDb YZaGhlOkwcvLOpu60KBkOgFrLjqmZtzQw+y4W6zc= From: Umang Jain To: devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: "Paul J . Murphy" , Daniele Alessandrelli , Sakari Ailus , Mauro Carvalho Chehab , Kieran Bingham , Umang Jain , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/8] media: i2c: imx335: Improve configuration error reporting Date: Fri, 8 Dec 2023 20:37:49 +0530 Message-ID: <20231208150756.124720-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231208150756.124720-1-umang.jain@ideasonboard.com> References: <20231208150756.124720-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 08 Dec 2023 07:08:41 -0800 (PST) From: Kieran Bingham The existing imx335_parse_hw_config function has two paths that can be taken without reporting to the user the reason for failing to accept the hardware configuration. Extend the error reporting paths to identify failures when probing the device. Reviewed-by: Umang Jain Signed-off-by: Kieran Bingham --- drivers/media/i2c/imx335.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index cbabef968e21..31c612c6bdd8 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -795,8 +795,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335) } ep = fwnode_graph_get_next_endpoint(fwnode, NULL); - if (!ep) + if (!ep) { + dev_err(imx335->dev, "Failed to get next endpoint\n"); return -ENXIO; + } ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); fwnode_handle_put(ep); @@ -821,6 +823,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ) goto done_endpoint_free; + dev_err(imx335->dev, "no compatible link frequencies found\n"); + ret = -EINVAL; done_endpoint_free: -- 2.41.0