Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6930206ybn; Mon, 30 Sep 2019 06:09:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUYlHk1ubBpKWtWRLMzjZRBICFZjROgw0XMbbT9hEEVlW35pyf3lluxGeqPgazdxR8AAEp X-Received: by 2002:a50:8933:: with SMTP id e48mr19316162ede.51.1569848977858; Mon, 30 Sep 2019 06:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569848977; cv=none; d=google.com; s=arc-20160816; b=QnIbDlxcPcgYAe3p7sF6heYra7pSTcuQ24UT4Ko2ktQZOgEvnHyNvrQrbo0Kjia9s3 23vcYvg4NA5blRpzj2QmS/8RaW+hKXgwNYvkJ8fnWpPBKiOR0BuEpghgxn/1WljB0+J6 VjP5nB/KA+jl8lIlHcB+cthNq7ccKRTtKcCefvRVXmrI6X8DYnhpgF4lRPFjeg1dww2o xujlkVqMG7hddRviCDMLTPcQAnpziQh9yahgRexFm1LoBY9Q2C7c7QlllvFXfB0PondD 2qrspxd0Oin1PQ0jYpAtP71ylfRD7m6t/8TPy+7ZGXIzbA/dwcKVYAsnidts6BbVA08w 3ZCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LCOBGVJtRlLNhGx2p/gJEyJWLNeA6ReZ6lfswiCzNJc=; b=mS5/7QP9kQofkvVlqSprWbi1SG9Nb01SvsXFBdd9QgTq8i86RVZEkMWoa5yIXB9BRx b7M5NY8ZwcZP3vJb3BjloEvGuNgtaSVb0btoKENbbgTHkJavj2rHwE7bfKREADZKV8jY 5PiXAHoAInJGYdrxGs8hAUHamLPxt2k7Zd8wUDfWeWjo/m/WOQ3B7MYxQ+3Fnj9AyLS+ ok0zVTSOKhinVDDooeRZ6+XTf6oESGG3Mrs6JBuwaT3zlOQZKa9WA2s7O6zcuiRbvJDS thyhemmOE4ZyEc6OlxJKFNBFdhMWsgxPRbWWJLBSkkBDszygSTvho7rigy6W6U0xeczU SwiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RseL+Emd; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn13si946771ejb.114.2019.09.30.06.09.11; Mon, 30 Sep 2019 06:09:37 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=RseL+Emd; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731373AbfI3NF0 (ORCPT + 99 others); Mon, 30 Sep 2019 09:05:26 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:48832 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731105AbfI3NEn (ORCPT ); Mon, 30 Sep 2019 09:04:43 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8UD4fSQ122620; Mon, 30 Sep 2019 08:04:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569848681; bh=LCOBGVJtRlLNhGx2p/gJEyJWLNeA6ReZ6lfswiCzNJc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RseL+Emd7cWwj3DBwgi3YtqZbIX/Np3Ii4rEHme4ogSoMD2wf5KWtZJqxKA8d9v1c rROClNZLhTinYifv8gFvTVRAQaLX3JgfeI90VaLduIF/MV6PUNE/+b34GRS/jUKQJJ 5+oBx6XHSuJtH0E2b01oHQiUM7BSWuJSdtUoclmc= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8UD4fNx084387 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Sep 2019 08:04:41 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 30 Sep 2019 08:04:31 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 30 Sep 2019 08:04:41 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8UD4Zij115624; Mon, 30 Sep 2019 08:04:41 -0500 From: Benoit Parrot To: Hans Verkuil , Sakari Ailus CC: , , , Benoit Parrot Subject: [Patch v5 4/8] media: i2c: ov2659: fix s_stream return value Date: Mon, 30 Sep 2019 08:06:40 -0500 Message-ID: <20190930130644.8704-5-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190930130644.8704-1-bparrot@ti.com> References: <20190930130644.8704-1-bparrot@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ov2659_s_stream() return value for invoked function should be checked and propagated. Signed-off-by: Benoit Parrot --- 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 f77320e8a60d..da181a13cf44 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1187,11 +1187,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.17.1