Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1094151pxk; Thu, 3 Sep 2020 23:37:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRMJsEZm3WN7RT/XGVHo9lf3H+RRPZjVpnPtm4RJf4/9VqiSck3OZzsS6bld/QSR+GArq5 X-Received: by 2002:a50:fd19:: with SMTP id i25mr7044928eds.142.1599201422763; Thu, 03 Sep 2020 23:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599201422; cv=none; d=google.com; s=arc-20160816; b=hQDHHfC2skMY98r9uxJmrT56IZfALKZ1Nyy+B4GEIxXg5maYrk2EdN+zfsLsy6pVkz EZzfOcN12LPNZqNT/k3+KHU852UwMJrHmX1iKAGp6EbN51Uv6B6aYXGJGFPXHRPnr9jd /cH39stAagvBZGT7wsSEYJnF29xX6mBzjEXnJ53+psWfS/NK/ESo+Gr0unvtTC/NC32y 3iqZHyucYM8c+sGoNWG7jsxl/HmwmAen7GMOjHzZDnKBoyHB1glrPtVihlOgOsvuKP1X ShP05Rq3Af5DWEyGN9LALthr9UpgcW/n9Y+vhJp1kaOSBwwuNxNk9890Bc5p+QpSH3pf oALQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/nEvMcYcQDU1SKp7DuIR7lsg8jaYz/VuKkA3WV3EDT8=; b=h5msNQETd14vNzk3Mlxvwl2wp6vKsf8zKS2WhVrhcz1anr/HWEnzU4i4TKPeRDkg67 SNC4pSHfOSChvRa0rh66mjg1S044EgmApRPW86bPoapDskWFHD7kWJTFX2ShvpN71pHD mGexuzLha/z8kFLAKBY79WDoit2E/tY+ukW+e6D0fmsxj3d2lwtEIQ+ih+Gb2boyZD/F l91rLze73gxu7nZIsSgZk1bYDvzvFz9MshDWLNlksWGf2Kw0kH+ju9FbnMlsoSJ8aHV0 UCE6QSv1R7nkTxoRqs7xhoAF0iR2/VyjoBiG+rhoLu34OwhnhHVJzs2WdBzBBYDhYXs4 rJ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=p4391RoV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec7si3487248ejb.359.2020.09.03.23.36.40; Thu, 03 Sep 2020 23:37:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=p4391RoV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729550AbgIDGf2 (ORCPT + 99 others); Fri, 4 Sep 2020 02:35:28 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:56980 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgIDGf1 (ORCPT ); Fri, 4 Sep 2020 02:35:27 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0846YLib093171; Fri, 4 Sep 2020 06:35:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=/nEvMcYcQDU1SKp7DuIR7lsg8jaYz/VuKkA3WV3EDT8=; b=p4391RoVK+UFuMMBCRTMMxJEX+uWNb1T2I8FsdceBrSbeL/PuwbIruCdw6+XxofjYboS NWOW8KR4EDDSsq3wMNFqZqb4zxY3CvSGDLu7SRuK8PIbR+Ss4zGKVDwaqbKCq852YSE8 23P/jweDHvIyxKC6JUktcjLGxQpJQhRAZNAv5pq1U2kc4H3fXZtMAsx304Hs51TBetUT plmoIlem1MdZ4gIDh6lov39y/XoM6Vtca8t31E5aHDNQJvYTzWbGoAnJhshAc9k7B8bf 6KQ0vsvr3HuABh+/j0TtnbppYhVxeL2S342asqSk6GefliY0Cf4VqorhXPKdUIz+UA73 nQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 337eymmqn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 04 Sep 2020 06:35:21 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0846ZJgt053408; Fri, 4 Sep 2020 06:35:21 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 3380kt0ay5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Sep 2020 06:35:21 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0846ZEJr007484; Fri, 4 Sep 2020 06:35:16 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Sep 2020 23:35:14 -0700 Date: Fri, 4 Sep 2020 09:35:07 +0300 From: Dan Carpenter To: Alex Dewar Cc: Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Linus Walleij , Alan Cox , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: media: atomisp: Fix error path in lm3554_probe() Message-ID: <20200904063506.GJ8321@kadam> References: <20200903173843.GF8299@kadam> <20200903182502.709300-1-alex.dewar90@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903182502.709300-1-alex.dewar90@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9733 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009040059 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9733 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 bulkscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009040059 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 07:24:51PM +0100, Alex Dewar wrote: > + > + ret = atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH); > + if (!ret) > + return 0; Ugh!!! This is a a special case of the "success handling instead of failure handling" anti-pattern where the last condition in the function is different. I just fixed a bug caused by this on Wed. https://www.spinics.net/lists/netdev/msg680226.html But it doesn't cause any problems here so whatever... Reviewed-by: Dan Carpenter regards, dan carpenter