Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7887837ybn; Mon, 30 Sep 2019 23:05:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwM4Js81z0uINOePMp5GZM+VP5yWbNHbidwaQE5Ik5l7DzKckM9UsfvK0nfjrGEgJgJ5Lic X-Received: by 2002:a50:f391:: with SMTP id g17mr21960409edm.163.1569909940068; Mon, 30 Sep 2019 23:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569909940; cv=none; d=google.com; s=arc-20160816; b=GRcMoHoa02rONeKWZif+sDyPR4D4rcy5VX8qL5nqfttMg+GGlrWwTeRyQwXPz5KOiC ZBv04lOf+ReJLLRO+uVICguf6W0/QkwiOTh+CaY+nnQ26Yrd2osZtzTPryLw0m7/ZHB3 4Y93W28YPGir0rGE+zT2wgKhYTo4a0phPvvMDE/7H5bhzS9mf5VSlnlLDCEpEt3MRMXm I0ZIcMzm5EKZh5IikvxmgwLBS6Knpaf3qtIYJqd0J6yp/iotnVPXBJoiRDIq78kyACUF bOujm83BfIs7UoluAPhDVJT5IR9mk8eKLP0/nZZXlj1M5wt3+RKB4Osk05UdoeG15NE9 guLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oEIJNBUFx9U+QiZqRvXaEBKRw5Gehkx+h0Lui6mqiMk=; b=W0wyKdtMxPdEHhqHkhl+9Q9coB2zwklxlwH4CQkf9UIBss9PFchOWLqvBGPTnC62cj LYPyfnbR6E7m0L6uguCHW9yqM3cWwcdsjCUxx9AtORwEScsTx8oyNrn2BsLt+NwViBkz kncvejpwetQ5j56vb3euBNCN9bPuLp9c/ietcBGGEx83zIU1FWqVpVSx7Wsup+MhnI2V 9kA58PDraRqT2IB2xiOR0cB9VL9YbisYfym6dM4G5mFYtozamAGY2bujk9+CnoxCTwNJ GVfAQcL1p8Icjd3JcOPTmNaYPZyv7Dx+/hbH9xDSA/jbKgt8TTkHADowL/am5buh15Hc 9Umw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BjC4sH+a; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4si9853911edk.331.2019.09.30.23.05.14; Mon, 30 Sep 2019 23:05:40 -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=@gmail.com header.s=20161025 header.b=BjC4sH+a; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731799AbfJAGE5 (ORCPT + 99 others); Tue, 1 Oct 2019 02:04:57 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:38992 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbfJAGE5 (ORCPT ); Tue, 1 Oct 2019 02:04:57 -0400 Received: by mail-oi1-f193.google.com with SMTP id w144so13364016oia.6; Mon, 30 Sep 2019 23:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oEIJNBUFx9U+QiZqRvXaEBKRw5Gehkx+h0Lui6mqiMk=; b=BjC4sH+aVzzM5CI09HoOBZVGXyJKiHbuY+VyANdqhQi7Iut83Q5ZlYz4Izw/lS8mCs Iu1Af+2xTs63Py+2AAvL4vLj7rHEPCGfv67X4xHpg7g54K3RH0pwD2XUDfa6znT22YqB U1KR0LDf0CYqIArYS5JapKAuSlQz+3MEDvr+DZBiaXnnLU5hVZkysTYLuBATmsvGNplu Hje4WJ8e2XT/j5+ZCvpAc8pO5+gu3o514VVpjUAybEodIxbZ8GnT40NMgnEqImbTF4i8 aV9Uxq9I5teqk32KhCEgcRW/Fhe5BnDA6yqcmjibKujWeJOwIiYxRnFhwA5D04SPrYaF 3/HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oEIJNBUFx9U+QiZqRvXaEBKRw5Gehkx+h0Lui6mqiMk=; b=UzdzqnNkb0yM/Usr+HlDz3l0uurYc4O2+zoR0dWN2U568AOlhQdpgYz57mKU4mjOI4 tmG1dSLhCNGbn3Fmr2dflm2ZE1dLH3C7afzOGS5xEQRCQzdN6nrAhTAc+XvQByDh2uFp qMOG5TVt5rbz7T4GOFe5/bb0neEFqsPW67kVLHXKtjWqUFYkNDDwdCL2zL772VVgIYJw HDmJLQzwGbrfRymJuEAiYnWVxvOU25OCi5aWnW6zoL+I2d3hn9Atqz7GMJR3POWdFSUG 4tZxbgqa+dXPAOQcz0tAz+08VM1a2Z2RQZigfyW/sd+C+MSacOeJeTcNCgY/3zBKappU Y5Yw== X-Gm-Message-State: APjAAAUqCQ2vifoD95YmlkqM4WKiGrjKKgK9tWSVD79S4wOcTIrQGUlm T2Bo+oFYjZ1jNrtnrk+RSDij5s5/PP9vSabsb6pHIngQMEo= X-Received: by 2002:aca:5ed4:: with SMTP id s203mr2323789oib.101.1569909896234; Mon, 30 Sep 2019 23:04:56 -0700 (PDT) MIME-Version: 1.0 References: <20190930130644.8704-1-bparrot@ti.com> <20190930130644.8704-5-bparrot@ti.com> In-Reply-To: <20190930130644.8704-5-bparrot@ti.com> From: "Lad, Prabhakar" Date: Tue, 1 Oct 2019 07:04:30 +0100 Message-ID: Subject: Re: [Patch v5 4/8] media: i2c: ov2659: fix s_stream return value To: Benoit Parrot Cc: Hans Verkuil , Sakari Ailus , linux-media , devicetree@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 2:07 PM Benoit Parrot wrote: > > 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(-) > Acked-by: Lad, Prabhakar Cheers, --Prabhakar Lad > 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 >