Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4617512pxj; Wed, 12 May 2021 09:20:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/vG43XYYOOyDe3lRJN3QBK6n3ggCGIi060IxMMyC7TTlkSJA+htJbCgEoS3/Cwz6nwQzu X-Received: by 2002:a05:651c:547:: with SMTP id q7mr1388933ljp.482.1620836405402; Wed, 12 May 2021 09:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836405; cv=none; d=google.com; s=arc-20160816; b=of2VEOLzmzy5vBA9ZWXJHiyUi/py2hj0fiEKKK6TvpAUA5WvTC79KNsIW2Cuf78gWp NxOmcmNmaqo/U+FaXQTwslQnjQZy/qTwuPPAp5YSOPCOy7UoeXGpsepwm3rY7UP4tZY7 rYYFxpNOlmw3QyTb+jt2depwfQ5o1EiHVg/zGNqBprSh0rfgmI5k3PgrLKINLRvNQFvS /wef6VQPIw2geyNdkybcHsBsQyPiTQFVpyPU4basb+eBqp74o2OX79wrKey6BOQVMpLl DPW5Fwu+wruDfigtUOZowHCQluAZH52SYWugX5wjdeWbrHQeEwDv2Eh53bMMhi+RH682 lFHw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ngY9rCEqguoKwYB0afquF1O+D4qZ1/FdVbR4arN3xI8=; b=xtDmG9FbvzLFU0jbSQtt6w2YRojOvHYafiSqIPCQuh69uqEDVt0cews8494Vth6XPd epCMIgEUTAju71L0h5sU4JuOl/uCNhG+8pkh4tYfFdMz1OpoPUaiEup3OpI6TpLp8DA1 VK/ZXQyNoSFMiIZyJ7HC6NCw4TUcWlYQ5XpCv+kHN4d6Qvah4UpKkme8s6o23eHflzgX uvo6af/WiY892ZOcWxiZslnSC/o34oYH4WagX2aWHcZeWNc8lt+1VZrQ7sB4zUvJuF4D lAGuSIZbc92EndriGZpjPl+80EUhq4p8+Kdy8lZ5KhnTipzOa6BR4MkGLgkTWrZyk6wj uBAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jxZ6qRK3; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si310127ljn.279.2021.05.12.09.19.35; Wed, 12 May 2021 09:20:05 -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=@linuxfoundation.org header.s=korg header.b=jxZ6qRK3; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235456AbhELQOT (ORCPT + 99 others); Wed, 12 May 2021 12:14:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:49178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233565AbhELPbP (ORCPT ); Wed, 12 May 2021 11:31:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C444761976; Wed, 12 May 2021 15:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832574; bh=OmJ4TvJBoQB/WEBS8DulLTxmNKPaVlRzbj6sCd80PWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxZ6qRK3A5YssfsrrUs8wS2hAmnma6H1AmUKUYcvv75oQmZ9RKQpb71xZK6E0JUg9 MNlAFVOjhBrrFaLV7RDemi6JjroBLYilAQS222HR1Qq5ocNnUk+Su2OBUE3cloos7g 6hPepGS/4p75NKKVoNoYauqYylFbGdBKTA9FAviU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Jia-Ju Bai , Chen-Yu Tsai , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 292/530] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming() Date: Wed, 12 May 2021 16:46:42 +0200 Message-Id: <20210512144829.407453036@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai [ Upstream commit f3d384e36630e2a552d874e422835606d9cf230a ] When sun6i_video_remote_subdev() returns NULL to subdev, no error return code of sun6i_video_start_streaming() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s") Acked-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c index b55de9ab64d8..3181d0781b61 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c @@ -151,8 +151,10 @@ static int sun6i_video_start_streaming(struct vb2_queue *vq, unsigned int count) } subdev = sun6i_video_remote_subdev(video, NULL); - if (!subdev) + if (!subdev) { + ret = -EINVAL; goto stop_media_pipeline; + } config.pixelformat = video->fmt.fmt.pix.pixelformat; config.code = video->mbus_code; -- 2.30.2