Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13477454ybl; Sun, 29 Dec 2019 12:51:21 -0800 (PST) X-Google-Smtp-Source: APXvYqxDEqxqnd0r6xKisOgde6iF+eSleucJ/5blLTIDVxBwuDg7wflgWUTayP1Zfk6sJrJ4N6GM X-Received: by 2002:a9d:6f0d:: with SMTP id n13mr73012301otq.165.1577652681586; Sun, 29 Dec 2019 12:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652681; cv=none; d=google.com; s=arc-20160816; b=069p2nB6kUdbxvZ4ARc01f0r/F37o0f2QyjWN1+GSIa0P/T+DHEcmjJv7n0Od0AHCY q4wfNO14ZUOHNt7zP1zHscyEU7XhBDphsYW0toAWYHxnGn+Zhpe1lIf5F+Txb6xhd/kw CmNGBSx1v53RIBS3zZ0Qc8iPPobqESY+FkzZiPWKv3PBzNQMlicaH8CoFq3yXjmdj2W6 CSRLodGbApOFylKwR/NMoxclwheaGs4wgIPEWNSlppR/3yfFXKkOJG5JmM8JIfjdmSHL 1rHPeLbz4+GKhKeJVVQc+6NlP/mJtvwhBdLH6M/nn5FHtsL3ruYms2PKhGWaDPnE6Z1T aYkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w/cWDoc/tYa9Hg0UtQdvDtzBux1F96zyLmjfHzSI1mk=; b=wgfKQEMZNhMGY1TSvVjEuHWHHnTt7pBFCfh/zBD0vXmYdLFs2xOXwVmN2mdvIqURNr SvK0e1ZnYbFfOgnzZ5jCiGQMnhucU1c3XBbz2H6Sx21Cehy45bs/cyAPgs7J2RT3fZt1 Pu22nK0YSTZ/RC8LeVqjJU1sQn/fQvpBaE7ZYCdvNX/kjmk18GylZcT/mlWWNAoQghhq /J8mD71D2AAhWl4k2SOrw92FBGXJH76HhWwLi1qhdSN0lHC8UQkKaiF5UiwrggGEJ83G vz2NTzC186zuDajim2X8X4WmM3oIDz0W3NMvFBhNzFVMOOQYdjJAedb3wi2ahfgrWa1c pujg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bRbmdZek; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si13734341oij.200.2019.12.29.12.51.09; Sun, 29 Dec 2019 12:51:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bRbmdZek; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387724AbfL2SCp (ORCPT + 99 others); Sun, 29 Dec 2019 13:02:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:54428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732515AbfL2SCo (ORCPT ); Sun, 29 Dec 2019 13:02:44 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E185C207FF; Sun, 29 Dec 2019 18:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642563; bh=SigJjHNqBFtHN3igdXzURp3lvmTFztSboPXepyHJmrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bRbmdZeki0hiSYtA6GMcl5QuM68d3ylCaDZCd/FsUvE8+RE7mLlQfI7wYLlemyznz 4xI8id+C81wFC58/sHwu2Vuj30PWUO3pRHFy5DJVtSnnNftvWfFXCQ9iDVTcjBPbSC fgT4SYQe9Ra0MMe+MFHoipCUuZG3ikLCm8hOGRgo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benoit Parrot , "Lad, Prabhakar" , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.4 081/434] media: i2c: ov2659: fix s_stream return value Date: Sun, 29 Dec 2019 18:22:14 +0100 Message-Id: <20191229172706.952860684@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benoit Parrot [ Upstream commit 85c4043f1d403c222d481dfc91846227d66663fb ] In ov2659_s_stream() return value for invoked function should be checked and propagated. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/ov2659.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index f4ded0669ff9..70bf63b9dbd0 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1201,11 +1201,15 @@ static int ov2659_s_stream(struct v4l2_subdev *sd, int on) goto unlock; } - ov2659_set_pixel_clock(ov2659); - ov2659_set_frame_size(ov2659); - ov2659_set_format(ov2659); - ov2659_set_streaming(ov2659, 1); - ov2659->streaming = on; + ret = ov2659_set_pixel_clock(ov2659); + if (!ret) + ret = ov2659_set_frame_size(ov2659); + if (!ret) + ret = ov2659_set_format(ov2659); + if (!ret) { + ov2659_set_streaming(ov2659, 1); + ov2659->streaming = on; + } unlock: mutex_unlock(&ov2659->lock); -- 2.20.1