From patchwork Tue Sep 24 16:44:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Parrot X-Patchwork-Id: 11159265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBF7313B1 for ; Tue, 24 Sep 2019 17:03:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 912C3214AF for ; Tue, 24 Sep 2019 17:03:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="MalKsUtt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404017AbfIXQmY (ORCPT ); Tue, 24 Sep 2019 12:42:24 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:46986 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391189AbfIXQmX (ORCPT ); Tue, 24 Sep 2019 12:42:23 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8OGgKoN064266; Tue, 24 Sep 2019 11:42:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569343340; bh=ZkL2CWEO79hER3mS3ff0HKdkey2wqW3jLAeLx0uw2eg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MalKsUttaEOCmvXhjeep8WSAmJ7kcETxWSjvMAKBCQCaC3vpCYMOcIkISHgcH3/F3 buMCoEFdVGLUXU2QnouE3f79d3LLt4ljySlDxqMYL8sNx53ZFgLS5I5QWne1KjE5ur kGSp7FVMDoXCvp+rdxq/1bqfCKaRYS3V6T4MkEn8= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8OGgKuj079131 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Sep 2019 11:42:20 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 24 Sep 2019 11:42:13 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) 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; Tue, 24 Sep 2019 11:42:13 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8OGgCQW073229; Tue, 24 Sep 2019 11:42:20 -0500 From: Benoit Parrot To: Hans Verkuil , Sakari Ailus CC: Prabhakar Lad , Rob Herring , , , , Benoit Parrot Subject: [Patch v3 4/8] media: i2c: ov2659: fix s_stream return value Date: Tue, 24 Sep 2019 11:44:10 -0500 Message-ID: <20190924164414.21897-5-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190924164414.21897-1-bparrot@ti.com> References: <20190924164414.21897-1-bparrot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index f77320e8a60d..cd4625432264 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1187,10 +1187,13 @@ 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); + 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: