Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751586AbdGQOaq (ORCPT ); Mon, 17 Jul 2017 10:30:46 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:43098 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbdGQOan (ORCPT ); Mon, 17 Jul 2017 10:30:43 -0400 Date: Mon, 17 Jul 2017 17:28:17 +0300 From: Dan Carpenter To: Arnd Bergmann Cc: Hans Verkuil , devel@driverdev.osuosl.org, Niklas =?iso-8859-1?Q?S=F6derlund?= , Alan Cox , Greg Kroah-Hartman , Robert Jarzmik , Linux Kernel Mailing List , dri-devel , adi-buildroot-devel@lists.sourceforge.net, Linux-Renesas , IDE-ML , Linux ARM , Tejun Heo , Andrew Morton , Mauro Carvalho Chehab , Linus Torvalds , Daeseok Youn , Guenter Roeck , Linux Media Mailing List Subject: Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool Message-ID: <20170717142817.gq7xnmj3ajkvpqhe@mwanda> References: <20170714092540.1217397-1-arnd@arndb.de> <20170714093938.1469319-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 26 On Mon, Jul 17, 2017 at 04:26:23PM +0200, Arnd Bergmann wrote: > On Mon, Jul 17, 2017 at 3:45 PM, Hans Verkuil wrote: > > On 14/07/17 11:36, Arnd Bergmann wrote: > >> @@ -201,8 +202,9 @@ static int cx18_g_fmt_sliced_vbi_cap(struct file *file, void *fh, > >> * digitizer/slicer. Note, cx18_av_vbi() wipes the passed in > >> * fmt->fmt.sliced under valid calling conditions > >> */ > >> - if (v4l2_subdev_call(cx->sd_av, vbi, g_sliced_fmt, &fmt->fmt.sliced)) > >> - return -EINVAL; > >> + ret = v4l2_subdev_call(cx->sd_av, vbi, g_sliced_fmt, &fmt->fmt.sliced); > >> + if (ret) > >> + return ret; > > > > Please keep the -EINVAL here. I can't be 100% certain that returning 'ret' wouldn't > > break something. > > I think Dan was recommending the opposite here, if I understood you > both correctly: > he said we should propagate the error code unless we know it's wrong, while you > want to keep the current behavior to avoid introducing changes ;-) > I don't know the subsystem rules at all, so don't listen to me. regards, dan carpenter