Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18300439ybl; Thu, 2 Jan 2020 23:01:47 -0800 (PST) X-Google-Smtp-Source: APXvYqx121fz4AiTWF89JA4ZxkAs6V4Vr5i5cVLkGY9bIFSjClXOoNcj43zRoJjLVZrZHBukZbfP X-Received: by 2002:a05:6830:c2:: with SMTP id x2mr85896299oto.8.1578034907311; Thu, 02 Jan 2020 23:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578034907; cv=none; d=google.com; s=arc-20160816; b=k2tFnpJaoXmSNBQc1CsesAHiNic8g8jkzYHEOK1TC9TxB8I0HELN+JH0MzpDzkm50G jN6OvgZuP0dffdj6K2pGy8WrdntW47TMNEVz7sE3hmBwzDDc2+y/LQG3PJH91rO3F2Gc eWkNptT/PIuT96QkA8XCJ3X6CK8WZzJSgP8cXsqbNh+xBv42bNmHYyPiwAqYACD4M5FH lKSVCUIgxswobuEN6sAstEBqXr+lLP6lRWRohZBtdS7I6L6zhcjOY7yK12M2CsZ/TpQb tn0zO02kti3XuFW+rO2+CqvMMOZqjHqWbz9GdsInfJ5xyupjpx+5YdcedqDvk28YQo04 lhhw== 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=KPj0DjykgbI9XxpNyFuOYNa1s8/TiGvxl87UyiBUQyg=; b=OC/GwRvIQwWF7ak3GSJr90gjDKqlEEO4/8l8nAU805eSjJevMYcQZbu0KLPF2TJKU7 fVfdhWvrQazDoSRR6UBBZMI7G/7F+UXxdJZE+zpU4hetgj1iaUt0SAEd7zL8q9MuYHHl ymRtinpyUo9JjCpR9nJiiMzFq7X4d4Dw+lk9SIPnvBSqq8Ipo+hNsTfZ684tsx2NHXnR ocS0frsZ4yx8RBya+EHUkfE0hnTI+nbGIOSw2iBifVbL4X/wiX3fBZo/zF2V2Y8rCt3y ks4JzjPDLDJpzro+RZ+kCt+FdbTp8tQLyLbt4eapYBdp2NdD1fXcDFKOSdELt79RII/t CDRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BXRDi3lk; 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 o206si28460789oih.143.2020.01.02.23.01.23; Thu, 02 Jan 2020 23:01:47 -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=BXRDi3lk; 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 S1727359AbgACHAk (ORCPT + 99 others); Fri, 3 Jan 2020 02:00:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:46916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbgACHAk (ORCPT ); Fri, 3 Jan 2020 02:00:40 -0500 Received: from localhost (unknown [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 CCB8622B48; Fri, 3 Jan 2020 07:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578034839; bh=7mMl2coCIwrjv8ZjuppYv4Ajb+6am/ysbKBocSDinTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BXRDi3lkGZnwcirnTx3gVDanwDnBUP6yPsrjAB8vlrQz+ggkGodhpaS0O6emR3R71 TzXLxo0CnV3KNUJSN9Ne5vN9R434xWb2TJCu+ZBXbkjABDf1VjJMDQASqX5pWfZds7 UBDTcy+6RAxiIyJ/94vHw6UE/GRTTtCpH/F1QGbg= 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 4.4 012/137] media: i2c: ov2659: fix s_stream return value Date: Thu, 2 Jan 2020 23:06:25 +0100 Message-Id: <20200102220548.391275901@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@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 fadec1d70582..4f43e8c43950 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1204,11 +1204,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