Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp839441pxv; Thu, 22 Jul 2021 13:38:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUYkplcslc+GJZtaS2Vr/iDHWmoWJ4/k9DynQnZGRXVhItBUZYAWxFxzxg3dWePtvUFEgP X-Received: by 2002:aa7:c952:: with SMTP id h18mr1694987edt.18.1626986313657; Thu, 22 Jul 2021 13:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626986313; cv=none; d=google.com; s=arc-20160816; b=e58qeIgKaor9o5LHo5Yq0E2fXKfkQfrmEtX+mK+f4hNRPsahY4OOleKeEYbqMxf/wF QObYPr/5yV5PESl2aRqyoz+qALM9F0AP2rV/I1WjdznX15dHwvSXbIU9XngfIoGirT72 ATgl5x5U5KwPNjyYaVEn0USq/jYvfMTZgAzIW6t/m2Fbabz7BaUjDbiMRUDleROFoNQa 21EfSEG8qZIl9zFaPrxZjTGVD5GQagtP2OfIk0G+azfehGlDregZ1MLFF97xltK8MvCk g7A/237o3nrZ0N+fU6F9ygez20iAnEV7sXQHeoyLajLBKxAnAah5dMZoNtgCDIvMFx7M tEyw== 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=k4qNnWFiHZbuAXHFsT+bKVbo+jmeTJ2ycqVV3Ikcsts=; b=xIc+Q5hFsV26lNRZL45TWrlTIN4fL4rGq0e/7WLCjkd129MyKSJNdkAIevSOZn3kSt UliFEvxQ5NNBRgls/x5jUuT7bBDx2Wi8FWGEar7+UIxTuy0dVY15066cs6Ijqb8PElv+ mfF4O3KX/g3ypo+pz/gC+JVSbOQIKPIYlAHHkBNU2As8pL/oFLNRFt8Usj6wKGpbYNm6 jg85fuA4kTzMoyvc0L6kEwG+sHKfICWv/Q6i9OrHRLZIxhuozG+I3YldTw+ZOqEr0VeT RqXzx5vqDhMrbx6nGBkmQ7oZ/+KUgd4GEdkIcHzlkYAqK5DPMyEr8k9/QE7Hz6CDR0wi zm0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BSImA2lw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr1si15664890ejb.574.2021.07.22.13.38.10; Thu, 22 Jul 2021 13:38:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BSImA2lw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbhGVTyM (ORCPT + 99 others); Thu, 22 Jul 2021 15:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbhGVTx4 (ORCPT ); Thu, 22 Jul 2021 15:53:56 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC82C061575; Thu, 22 Jul 2021 13:34:30 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id n4so4066665wms.1; Thu, 22 Jul 2021 13:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k4qNnWFiHZbuAXHFsT+bKVbo+jmeTJ2ycqVV3Ikcsts=; b=BSImA2lwtaRokOJRUn5SwmTIPFyLWwyhK/M/tQvrARgoEoBaLrf3tZBUD/FRtOh3tp eiUOsGctClX0UX33WUdnPT14ahGDVjcvcALlhxRsEUig1lOwuyvw9wqESfWkLvd/CjSM oo5Y//Z2DB8CGNE3pVWWaeUa142YyoAeO7dXSWIYI4TG+9lmAP6W9LzgRcrsR/20z19e FoTIC8vm94svw6bimIsuObgAshpX08ZAGrpQNukI9sVkcDGnAg6T+ft6zOftvsVlEswY u62tpQN1k5ibMfVHYJpN7w5dgbIkU3iyUH3JAJdRsOi7kikryAXdSCQTXsBXUP+MwUht OIig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k4qNnWFiHZbuAXHFsT+bKVbo+jmeTJ2ycqVV3Ikcsts=; b=RRZ+29akMs9jcBlFxfxVC+VPbfj0aCj8gAASSVMEGdMBF3dOxhaVl5x3O9Gkj4fBxc vq38b4Ip/TEHxIHoDZ6Fxcn2diWUok+pIOk+SXaggnYW5i3+qrvUBpOy9inhjNu4RfCh /aRf8avk2hN3LRuFtpdG0CXI2IEV7SEHDtvYzJPRkoI86hQICaU95p9+3BVk2MTmS6+j jQQK0QZbFhvjOlWTXP703z3vflXBT9BogSGEte7JxEub+2YqTweikhHZMZIvFwIZcYKH XZ9QcfMkM9vVAdcclrChA0pkqU5KjIDuuOOykksUVGBDiR5M+5JXBDkr/55JKanf0xxk kaZQ== X-Gm-Message-State: AOAM532DhnDWxTccBCU+qJ9UKIhDHkYQ9O5zDHI8kbGEVMrl7+fdXMAv c8/RXcRkdC/EFbFys5KVewPmW9UVK0A= X-Received: by 2002:a05:600c:4ca7:: with SMTP id g39mr1308902wmp.72.1626986068657; Thu, 22 Jul 2021 13:34:28 -0700 (PDT) Received: from valhalla.home ([2.29.20.106]) by smtp.gmail.com with ESMTPSA id b16sm31036455wrw.46.2021.07.22.13.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 13:34:28 -0700 (PDT) From: Daniel Scally To: Daniel Scally , Mauro Carvalho Chehab , Sakari Ailus , Paul Kocialkowski , Ezequiel Garcia , Hans Verkuil , Yang Li , linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), linux-kernel@vger.kernel.org (open list) Cc: Yong Zhi , Bingbu Cao , Tianshu Qiu , Colin Ian King , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: [PATCH 03/13] media: i2c: Defer probe if not endpoint found Date: Thu, 22 Jul 2021 21:33:57 +0100 Message-Id: <20210722203407.3588046-4-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210722203407.3588046-1-djrscally@gmail.com> References: <20210722203407.3588046-1-djrscally@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ov8865 driver is one of those that can be connected to a CIO2 device by the cio2-bridge code. This means that the absence of an endpoint for this device is not necessarily fatal, as one might be built by the cio2-bridge when it probes. Return -EPROBE_DEFER if no endpoint is found rather than a fatal error. Signed-off-by: Daniel Scally --- drivers/media/i2c/ov8865.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index 2ef146e7e7ef..66182142c28b 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2796,10 +2796,8 @@ static int ov8865_probe(struct i2c_client *client) /* Graph Endpoint */ handle = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); - if (!handle) { - dev_err(dev, "unable to find endpoint node\n"); - return -EINVAL; - } + if (!handle) + return -EPROBE_DEFER; sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY; -- 2.25.1