Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp31698rwb; Fri, 19 Aug 2022 16:12:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR45ky+yBAD9juhK/wtY/0QasbgXTxpLk3D1V4+3VQRsvLZC58nH50BOtwRXS02CWjtiK5uv X-Received: by 2002:a05:6402:268b:b0:446:381d:7b45 with SMTP id w11-20020a056402268b00b00446381d7b45mr4484321edd.372.1660950771913; Fri, 19 Aug 2022 16:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660950771; cv=none; d=google.com; s=arc-20160816; b=WfScXJCtEAwnbuSV7xg3GNg++UnUEub7OMbbqQoFUEw5bRRkmH7kFH5dCPtVxcy5I8 dZwPmK4A2Q3lV4oOOddKJjpZb2x1C4WsWP9259JEarMXyMP5AtFwxwbXR1GpN4sL34j+ Tr8BemjgwFvTf6wCyvS49aRjpeBlmOeNqye/jGT632X5kRNzHijOV1Nsqmk2lMvimNsP N5fo/hb6erKQcG1WW3KMEDFm3MTglq4B9BKCm/FqOV2AJ7Py6nhRZ1Clt+l08bGvmemf 5Pmha32nKxDMWaoHUByu0TbcgzSPlJXamsPAOiDq8tr92yBU1bpcjDzHSMxqZeEutYHm C/Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eY3PGy+0ZnJYOusZqP/aMVjX0RIvUyfRFC1DMWpFfZg=; b=khwP1z/RHPaxYQggwCq7FM450Sb7vk+Ar0eQXNlJ53gmyv/TuuzCTVgk9BEVF8hmNv gfcqLmPeXti4HiEGWR/c1ELnrd0/m1N6mGqLsl1bSiDIQIMBXG5LriYcaJmQ9n8Pa3Od QrwmjrZe3BWc2UxQP1KkmOn6L/OzRsBSpYz9gE6F9kTFUNNgCHY1tvVkQ/tm6JRkIMn9 QODfbtbDwcailgeSjKioXUgOLBJJGPFmmKFZbrUF5bmDJCRqUFl71plEpgmnVsW7J2CD 0CK2L3M8IPsqRepUB1wJ8vStwY3tISxz1XE+O0jUBeGFH9kkSORBjUID/WmIeRwBxvgH 78mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=glGObiSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu8-20020a170907a08800b007321eb06896si3707042ejc.153.2022.08.19.16.12.22; Fri, 19 Aug 2022 16:12:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=glGObiSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242956AbiHSXDm (ORCPT + 99 others); Fri, 19 Aug 2022 19:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239974AbiHSXDk (ORCPT ); Fri, 19 Aug 2022 19:03:40 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 850AB2ED52 for ; Fri, 19 Aug 2022 16:03:39 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id s11so7258677edd.13 for ; Fri, 19 Aug 2022 16:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=eY3PGy+0ZnJYOusZqP/aMVjX0RIvUyfRFC1DMWpFfZg=; b=glGObiSPFperSGxZTSrRQtOSI2VugiytakxkMo/TSWxujrcWOKdkyRiEv6nE/LINGk krDnH1N19krP5sxNpCGq8r+aEt5vPLQAZTYJj6IGIKa+N4KHdt45fEnDbmgWfNihK7NC ozvdvHCx1qpMQl+ckHq+g1duXCyWHZW/7xYN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=eY3PGy+0ZnJYOusZqP/aMVjX0RIvUyfRFC1DMWpFfZg=; b=MoE1YAptigBRf93Rw3UqWwVMZvaYMmzXhEqLlsYnYm+wGqkAaHn4ciNwSiA5tC21Wc X03jZ0p1Gukgpbg7FC4CSYmcU0GYSVVUjJAkArxO1jK94cgHkhpx+nwKsYFTmB9eeB1R tl3iEwVUHMRwIOLx8ntrLE7coDpQt1IUAlaid2UY5ebzNycsRPfh+uG76G49YEv/iqyQ AtInzOBzx7cCgJDXWpOfz+xGnsc9V99MCW3NZZWL91UMM7OS3Ytcl9jiqWdd30mfEmD7 EvP5qz5soPn5WDAXQ/2IRVrYn3Zi64QfvR86IL4jEPaczxkOdADU92/EBzcH7QSn5KSG GZVA== X-Gm-Message-State: ACgBeo2y32tnbyq+SQ/6PPaJrat0koLJ1zDK6eIUcv/XUyQ9VeK4i+Mg +N42g49JdSyI+ERq5/v+fBRFKBuec5+eWd93hdw= X-Received: by 2002:a05:6402:440c:b0:43a:1124:e56a with SMTP id y12-20020a056402440c00b0043a1124e56amr7839133eda.134.1660950217796; Fri, 19 Aug 2022 16:03:37 -0700 (PDT) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com. [209.85.221.46]) by smtp.gmail.com with ESMTPSA id bj5-20020a170906b04500b007307c4c8a5dsm2905060ejb.58.2022.08.19.16.03.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 16:03:37 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id u14so6686502wrq.9 for ; Fri, 19 Aug 2022 16:03:36 -0700 (PDT) X-Received: by 2002:a5d:6881:0:b0:225:28cb:332f with SMTP id h1-20020a5d6881000000b0022528cb332fmr5244944wru.405.1660950216654; Fri, 19 Aug 2022 16:03:36 -0700 (PDT) MIME-Version: 1.0 References: <20220819194336.382740-1-ahalaney@redhat.com> In-Reply-To: From: Doug Anderson Date: Fri, 19 Aug 2022 16:03:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] regulator: core: Clean up on enable failure To: Mark Brown Cc: Andrew Halaney , Liam Girdwood , LKML , bmasney@redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Aug 19, 2022 at 3:48 PM Mark Brown wrote: > > On Fri, Aug 19, 2022 at 02:43:36PM -0500, Andrew Halaney wrote: > > > - if (regulator->uA_load && regulator->enable_count == 1) > > - return drms_uA_update(rdev); > > + if (regulator->uA_load && regulator->enable_count == 1) { > > + ret = drms_uA_update(rdev); > > I am vaugely surprised and a bit concerned that drms_uA_update() can > fail... In his original email Andrew implied that his system was misconfigured when he was seeing this error. I presume this isn't common which is why nobody had noticed this before now, but given that the function drms_uA_update() does return an error code it seems like we should handle it properly in the caller. -Doug