Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1207887pxk; Fri, 4 Sep 2020 03:43:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxetmLZDMSq+XJBf99SN5OFj/4pjUfJpcXq2UE/xNtBkYy/us+pdK+d4gpV0yinMZj46OFH X-Received: by 2002:a17:906:3b4b:: with SMTP id h11mr6560711ejf.381.1599216216893; Fri, 04 Sep 2020 03:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599216216; cv=none; d=google.com; s=arc-20160816; b=Ldv0CTs/t7L3rfruRU8g8rd3W8vSgrE02jeo0zQgRSSEbIv9HFapSy0HdjwOIH4YAE froVLtzG78QXrjGhAdHKA7QyKigw5NSGYQoykSG8XIE0Md2ZPp/9MOcNKbCbbQ0CTWAA HSyxvtzVByJjBXMQ5IfYFbKai+g9+XsEMWQaQ9YuGL21SampBFQ/frlVbvuDagBEgOM+ sJyri0lvrAmdmBBUPQY1Mmrf23AO2HW6TWRxmFBGoa2dJtFVT9Rk5Q2TOStsfcCH/zsP GTcRAXjcSK6DPicJBkbt8nhJUSGJ6u7CxEMfCy9EMXpx47TRwEUTQq6AxzshSITT8vKH 2Viw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=3izXtvVrOE9IVBsJHapU+PReiRTwBPkLKorzl9YTVRc=; b=AbO9TdbsqzSLWOO4m3+ln5LO8xxyjvGStRTK+O02iCuegH0efJESm+D+H43h7z4I3R WOJy8fILf/EidTBW9fXhrOXXgr9rmyryFRulY3KW+CXmWHyvJ8MkierqV0maeiwP8mLZ 3V/cmdzjdDlsL/VoaupZUZf8RmN/j1k8fuJP/n7aCLlyH9k68J2k73gnRvxLBi3XLZSZ ghR2dUOj/7GqtcZbNZ0vwmfHawxjdQQHfQGQXSYuq7sX91LJ2o0V6YfH9KCELyv52QJN oxh2H6k/k8/vAyyTtyUfJ+v/RvkDbCk4KLq76tF3RV+7/hbi16tAdk1ToT8rxx7IMzEE /5zQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si3497776edr.13.2020.09.04.03.43.13; Fri, 04 Sep 2020 03:43:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729930AbgIDKlt (ORCPT + 99 others); Fri, 4 Sep 2020 06:41:49 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:37763 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730200AbgIDKlL (ORCPT ); Fri, 4 Sep 2020 06:41:11 -0400 X-Originating-IP: 93.34.118.233 Received: from uno.localdomain (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 711E4C0004; Fri, 4 Sep 2020 10:41:06 +0000 (UTC) Date: Fri, 4 Sep 2020 12:44:53 +0200 From: Jacopo Mondi To: Lad Prabhakar Cc: Steve Longerbeam , Jacopo Mondi , Sakari Ailus , Laurent Pinchart , Paul , Hugues Fruchet , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Subject: Re: [PATCH v3 3/3] media: i2c: ov5640: Fail probe on unsupported bus_type Message-ID: <20200904104453.le66sdczzcjyhecz@uno.localdomain> References: <20200813171337.5540-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20200813171337.5540-4-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200813171337.5540-4-prabhakar.mahadev-lad.rj@bp.renesas.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar On Thu, Aug 13, 2020 at 06:13:37PM +0100, Lad Prabhakar wrote: > Fail probe if unsupported bus_type is detected. > > Signed-off-by: Lad Prabhakar Thanks Reviewed-by: Jacopo Mondi > --- > drivers/media/i2c/ov5640.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c > index 160d2857352a..3191e2b223c3 100644 > --- a/drivers/media/i2c/ov5640.c > +++ b/drivers/media/i2c/ov5640.c > @@ -3078,6 +3078,13 @@ static int ov5640_probe(struct i2c_client *client) > return ret; > } > > + if (sensor->ep.bus_type != V4L2_MBUS_PARALLEL && > + sensor->ep.bus_type != V4L2_MBUS_CSI2_DPHY && > + sensor->ep.bus_type != V4L2_MBUS_BT656) { > + dev_err(dev, "Unsupported bus type %d\n", sensor->ep.bus_type); > + return -EINVAL; > + } > + > /* get system clock (xclk) */ > sensor->xclk = devm_clk_get(dev, "xclk"); > if (IS_ERR(sensor->xclk)) { > -- > 2.17.1 >