Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3933351ybn; Fri, 27 Sep 2019 13:34:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7W4AUpeSHP6iC4b76AyefTd6wsoabD2mgyXRkBeASq9p+ZfEgnIe7/BvVIuqxhHf3o3it X-Received: by 2002:a17:906:95cf:: with SMTP id n15mr9507418ejy.183.1569616478799; Fri, 27 Sep 2019 13:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569616478; cv=none; d=google.com; s=arc-20160816; b=NK5wMpUi/LcC+x6LLHA4Etmczy+34v6yXlFzslOyR6/hNWvry6D1AjOa+1Q4YKQPiZ tRKoykTAWx30QRNLSPgadFYl7j4ivKmEp1C6UJ3DahNhDUV5bSJH1wX2QCXmlpmZP6fE EkMvs97ZsAcsAJSJOt9Tn5ouG5HLJWW+z/7vE8moLaNaWZvcqXr2qkblWLj+uB9LH/k8 kMt3UJ+mGanTFWYTMlrhxFJZw9JGIwpI3A4PBfZCkZQUrLJbdMCtqcNBw3NG3h3kPA21 rqbAlpUGMRrtkOrWh/zAtGiwmcbONPaaCKovzYEVhuiSSS1Dt7PtpQaWI8obx3WWPC6W oM1g== 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=KwQqUKwfYvMR0bOzWClRV+K1hIwPyt4XhIMj6/901J4=; b=Y9QPZydtiCO9kYQuefYzWWXZwzj1X/Z3vLViAot9cJNnbxtIakrD8RzMUyzxlx289y uvPH5ocVhHqFxxGFu93xd+Cu7nwdN4MkvfLKMi2+SdvgIVRInUR5GYexCkwnhIuVUgaG 5BFuo/GqeGKU9uwqvzB5L10lwcT8RuFbNqLE5yzhdm2C93uiwNDWYwwide9H5DlTzoQk rtotOsrzs+qFbCAoYM5C+Jls4KryiMkcPnOjERKgbtZMZVed5XjaAnSgjY7IW3+tfcQL t5pxOsuqwoWxET/+bNLY5COxCOCYtB5FYb2NAfU5auVmfqyzcR6bH/1vosBnLSBxdXvR txRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ik7ZBlY6; 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 f19si2414123edb.385.2019.09.27.13.34.10; Fri, 27 Sep 2019 13:34:38 -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=Ik7ZBlY6; 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 S1727607AbfI0Ud4 (ORCPT + 99 others); Fri, 27 Sep 2019 16:33:56 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:46389 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbfI0Ud4 (ORCPT ); Fri, 27 Sep 2019 16:33:56 -0400 Received: by mail-oi1-f195.google.com with SMTP id k25so6277584oiw.13; Fri, 27 Sep 2019 13:33:55 -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=KwQqUKwfYvMR0bOzWClRV+K1hIwPyt4XhIMj6/901J4=; b=Ik7ZBlY60EXvU5r5UbYDErhTPJ50/39lYOc2n2i99wHzeiUFivqDAu/I1wyHZzC5jB XVvbiV/FMFVSgV8LMhLi8Pd3BHWsZdqAhF1GhFiELSXWBOXQ4IUZVh5yqX5nZXarUYR7 mOwKf530o2JyzW1KbWrToS4H9OWHKFA/lEizgixMyijHjFm61g0r84taQNRqnzoxTGEM WYnuozS7fCsgUnxlVUW50OiFbCGGe0pDZa32IAdYLyRyQhyCUg3TARwBakWBQfIIo9Sd IS73WjQQAyKYZ4LAdfmx6b1hIaUmFlogopKAleEe6ltDrxc4baKdi9ws3an5f1JwqvDc FzEg== 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=KwQqUKwfYvMR0bOzWClRV+K1hIwPyt4XhIMj6/901J4=; b=XlbMl1cdc7J6Ra4IjXKF1WNcBpjWIXUb7oH5981gx2UAgaIJTqN0/YQd5JDmLhcbuL UdDSoOCOIaTbAXgz7PH/5MzrMCNyKHlHJrsOmgDFWmEs6MUprlMjp1nuahPajFysUNog kvFs/VHPiuSBEBJ+8P/2YRualXWnSWxyNY69COiFnV/KYIOWLADbxCLmFFMzWgg+nPrC UEVSJi7Gn5wY0sTkkdbN6U82jkFdp5p5OQuD1sDx3qbg7NTxki3C8cFzICAJcRqa/t2x jH/35Tkl9QXlAsWw0Mqenrti4a9AU606uwfPOakUhG13KkMeww3vUxF20whCkYF1TeLy NZcA== X-Gm-Message-State: APjAAAXrLAjgWvVSZzEMuDwJ4Q5+1/TdKfK2I0RWzmcGiMcKipN1UFpU NlymPWK+aIDzPd+ZOuALw/nlt0B1d9MzYs4Q3dw= X-Received: by 2002:aca:d485:: with SMTP id l127mr8327733oig.162.1569616434959; Fri, 27 Sep 2019 13:33:54 -0700 (PDT) MIME-Version: 1.0 References: <20190927184722.31989-1-bparrot@ti.com> <20190927184722.31989-5-bparrot@ti.com> In-Reply-To: <20190927184722.31989-5-bparrot@ti.com> From: "Lad, Prabhakar" Date: Fri, 27 Sep 2019 21:33:28 +0100 Message-ID: Subject: Re: [Patch v4 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 Hi Benoit, thank you for the patch. On Fri, Sep 27, 2019 at 7:46 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 | 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; > the "ov2659->streaming = on;" should only be set if above calls succeed, otherwise we might hit -EBUSY during set_fmt. Cheers, --Prabhakar Lad > unlock: > -- > 2.17.1 >