From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14664C433EF for ; Tue, 15 Feb 2022 07:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ipCibs40ZL77/68V72qsL31+WPQL9W+vCZ4VLZDJ2ZA=; b=qgMnOcJtufFRZ/ zVLpbwAiWIP4aYE922djxxbYhPdtqaMwxYKZfgr9SEjcmGbtQIeaIgCvsmnpRRXzxj42ZOoAteufj UoCytwalLoK/vqtcitEfSEbtHlLPyKD6FWS8Aa7f9zETUVLF+WuqwuV+lAHn9leupIR9ZNP2wEFRe Z3ST1gB5xGFLorP5zryhh987ES+FsWWaAet5KzabVEt50kkNgME9Ra6UkVDlNs8JV3UnzSnoJctK7 +7LY1OKB+bPAOyM5p1hxFkvY8GODC1vq7zZ5pW8TcXkRhqAKNAB/60bho0ZOhnBZcG3WIQ3cTITz4 wtj/0PM4pdJhGusknCpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJsgj-001POv-Re; Tue, 15 Feb 2022 07:55:53 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJsgf-001PHC-QQ for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 07:55:51 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3C251315; Tue, 15 Feb 2022 08:55:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644911748; bh=GEG1DSIU4IWEDQo1Tjve/iWZVxcmw/Uh3L34YH4IHEc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mYKrZLZzrMFaORoM38qEaP4SvvTC6v5Isxn/jGst8UbY3h5KW6aNcqPpjJ7UtZTAY v+D5WcEDKJ64oidfc8yv6JuMU6m1MlqaR51W6d/OR2S9LunrBDvSuQshyti9Usv4Fg eJoarb61EwxWxXxjGRE+2MI+R0pVTTqRqEem5OTk= Date: Tue, 15 Feb 2022 09:55:41 +0200 From: Laurent Pinchart To: Alexander Stein Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rui Miguel Silva , Dorota Czaplejewicz , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/9] media: imx: Fail conversion if pixel format not supported Message-ID: References: <20220211142752.779952-1-alexander.stein@ew.tq-group.com> <20220211142752.779952-5-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220211142752.779952-5-alexander.stein@ew.tq-group.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_235550_030120_00AA0924 X-CRM114-Status: GOOD ( 18.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Alexander and Dorota, Thank you for the patch. On Fri, Feb 11, 2022 at 03:27:47PM +0100, Alexander Stein wrote: > From: Dorota Czaplejewicz > > imx_media_find_mbus_format has NULL as a valid return value, > therefore the caller should take it into account. > > Signed-off-by: Dorota Czaplejewicz > Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart > --- > drivers/staging/media/imx/imx-media-utils.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c > index 02a4cb124d37..e59aaa77172a 100644 > --- a/drivers/staging/media/imx/imx-media-utils.c > +++ b/drivers/staging/media/imx/imx-media-utils.c > @@ -544,6 +544,9 @@ static int imx56_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix, > cc = imx_media_find_mbus_format(code, PIXFMT_SEL_YUV); > } > > + if (!cc) > + return -EINVAL; > + > /* Round up width for minimum burst size */ > width = round_up(mbus->width, 8); > -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel