Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp388541pxj; Fri, 28 May 2021 06:22:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSVWwHALOE/l3jEN4iCU/v66qd75LLVcShZ3isia8LLJqjoaJoKrvzxX7pxwPhn+RPOgNo X-Received: by 2002:a17:907:94c3:: with SMTP id dn3mr8684308ejc.26.1622208160955; Fri, 28 May 2021 06:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622208160; cv=none; d=google.com; s=arc-20160816; b=GJr9ygK8qRwAUGuoHJouLrA1xhVuYSKY4Pg2O/TTsYvWuUF1N0/uvwvBIgONHFjLSK dm7py4YeVHKtN2LBruzfDF+ivy36uspv7c96foGQgUFd3EAxl3+yzs3MIS441yuJgX3B jYusyuv1CZADaXwZIx/xnBBawQZ9HMQcTh1cBbWHhInLkSwl4keVz2x5zJ9Lh0toG06W 4ndMOXuWbZD633yf39N9qxWlqGFNL+ufuZQmQFZk/P7Oc1lGADpWPythV1BOlJACKpLm 192Aw5PytZKee5r0iBXt3Gr15t5j94Qql3Ik3ZcEQVNQxQmuxqZ+zQNS0IUGapFDBub+ 3Qtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=dXnrcwRkDojoQB1S3b/9jlwfC9dt1qSR1Beko13qs9c=; b=Vxu9ibZURAIeD8DUp5z85iuefe60AyMqhQIBeoBkMLUbljJJ5jN8KBgOjXuKIJih9K rPkmBsj9SS9hNY5C8c2VbvBu+AQyxPATC/qtaZ6iE2l0DUejGLkq0sJE3SkVGaGTzVem ryF/SsHS7MXhUCsM2qjsC24OM9EW93yUhjenM+DSr3mMPokYO7Pt0Z5QuqxosftHOf+g IYGvNEVhlMX+4Isk2zZg5xyP8/vBYPsgVHUHKMjcEnyGxxNuNE1vs8gJk7oxXlSuqzoX mxO6gAVIsBYVoeuIKUEqA0AbQe0L5hh38drY0B+Zi21OWPe6bXSZ/Y/TZQgxm3NNQ5/w G7VA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si4488112ejp.521.2021.05.28.06.22.16; Fri, 28 May 2021 06:22:40 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236562AbhE1Kwj (ORCPT + 99 others); Fri, 28 May 2021 06:52:39 -0400 Received: from mga07.intel.com ([134.134.136.100]:3326 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236340AbhE1Kwi (ORCPT ); Fri, 28 May 2021 06:52:38 -0400 IronPort-SDR: djpBFNttFEdKEclcmvpkSGegQPP6r6Ddlb1qod7pNiQeo5vTagwVINXMh6pW29lnbOaPyWgi12 cZvJ4LxNjz6A== X-IronPort-AV: E=McAfee;i="6200,9189,9997"; a="266821100" X-IronPort-AV: E=Sophos;i="5.83,229,1616482800"; d="scan'208";a="266821100" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2021 03:51:02 -0700 IronPort-SDR: pTWpuRB73zdELuMDVRaGK+RfNYVy1mMF3sBmnntZM2aId+n4j4ZbS0wTztx2FxOczz9ynQH+op 0eCncQF2fhmg== X-IronPort-AV: E=Sophos;i="5.83,229,1616482800"; d="scan'208";a="445582657" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2021 03:51:00 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lma4v-00FIIB-Ma; Fri, 28 May 2021 13:50:57 +0300 Date: Fri, 28 May 2021 13:50:57 +0300 From: Andy Shevchenko To: Pavel Machek Cc: Amireddy Mallikarjuna reddy , Linus Walleij , Marek =?iso-8859-1?Q?Beh=FAn?= , Abanoub Sameh , Dan Murphy , Krzysztof Kozlowski , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 21/28] leds: lm3697: Make error handling more robust Message-ID: References: <20210510095045.3299382-1-andy.shevchenko@gmail.com> <20210510095045.3299382-22-andy.shevchenko@gmail.com> <20210528101057.GH2209@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210528101057.GH2209@amd> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 12:10:57PM +0200, Pavel Machek wrote: > On Mon 2021-05-10 12:50:38, Andy Shevchenko wrote: > > It's easy to miss necessary clean up, e.g. firmware node reference counting, > > during error path in ->probe(). Make it more robust by moving to a single > > point of return. > > > > Signed-off-by: Andy Shevchenko > > You are now putting the handle even in the success case. Is that > right? Let's put it this way: it's no-op in successful case. But yeah, I would prefer to have a separate case for error, I'll revisit this. -- With Best Regards, Andy Shevchenko