Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3948879rdb; Mon, 11 Dec 2023 05:00:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYsE7rjc75/dWLgdByCUIy78YHal6/zD5DjYQ1jI91f8c6nRJIhTgi52QMMSHwb3Y5T3B5 X-Received: by 2002:a05:6a00:18a3:b0:6ce:b86f:1b02 with SMTP id x35-20020a056a0018a300b006ceb86f1b02mr2052161pfh.54.1702299653496; Mon, 11 Dec 2023 05:00:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702299653; cv=none; d=google.com; s=arc-20160816; b=sqrbd6OqkKh11sodKbm9aiUfL0JsvephZKN4BiVfaq/+rPFaUgHly+lV1f4Ubhs108 pGPOEpj54umZnN8lqUUMUNpnS/wdIQQRQXtfpLj6RwESv62m7oIBk9vPi4nDPzEfLRea fGe7a5SMBadwqC+b2wSWz/xDTAJTWIynFSVNul6Bzl2ZJmk8aDGRRaycrzm4Ma8F/MAT OTYvCR2ouABROGSTSYHx/Fv54yip1T62+vx8KyU8eaqTdSNAW/aof9yRT033TLmHnHGw A1z3ojMMrZQIgJ0ej/YFuOUP6174Lfs5R5hjVqYNS7MqKPLtu51VeViypukCmNU1B1QS Lp/Q== 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=kZXeY0Sfc/p334ncb31WxIOB5EWNWh7+wYxgMTxoTKOmynSWJV/PjsUdU0rkJYtyjd k4A+pQyFzpYGAUISYgua+V3i8YquH/u0JovPvOgWgJFYOrE3vqySofc39d+nFzDGINb/ vkX6PwauDZFJoltstNYWzmDkKesBp2nYmYeiq88ce3NvPh9DXj7GJmiId0KZes6y8VAt 41856r5GNe1Y8OzNVcTK27e9SsyoQXe0KUizmaQbUrqz4Nn0H72Lpnl/qh2uH25Re87B OljMOeenXlgTh8WXqvfSGBUdsNCG4SMrCvIfU3G9Oqpi2chhkhdI36FezuHq5xddjM8C FQdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SxighCXQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c8-20020a63d508000000b005c65f924f6csi5866491pgg.319.2023.12.11.05.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 05:00:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SxighCXQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 88C6D80942E2; Mon, 11 Dec 2023 05:00:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234880AbjLKNAS (ORCPT + 99 others); Mon, 11 Dec 2023 08:00:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343569AbjLKNAK (ORCPT ); Mon, 11 Dec 2023 08:00:10 -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 8E522C3; Mon, 11 Dec 2023 05:00:16 -0800 (PST) Received: from umang.jain (unknown [103.251.226.68]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D33F1515; Mon, 11 Dec 2023 13:59:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1702299571; bh=nrEAdhHZwA2L0AvxJ6FGfgqEfXwThQSUE+QCVNTuuhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SxighCXQ1l/fbMew3D4DHzVOHOVrQheuTYk5MLyvbcd2T0B/Py5iVrOursO8VWZTi KIzyYBkzkKkq3Vy8srl0yz3FvAoa0SOAdvNoId6iqSfHP222DugtUir/2acfy5m+lZ 0pO4DSI9apyNgWDWuhfW0fnqyZ152HnpUmbr0GWU= 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 v4 3/7] media: i2c: imx335: Improve configuration error reporting Date: Mon, 11 Dec 2023 18:29:45 +0530 Message-ID: <20231211125950.108092-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231211125950.108092-1-umang.jain@ideasonboard.com> References: <20231211125950.108092-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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 11 Dec 2023 05:00:39 -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