Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2908497iog; Mon, 27 Jun 2022 05:33:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vmcducqwzwuo1Ybm6VdOujQOyBPPlbvRkmENN9m+Q09uxyet0MjLqKut6xightdSGEtphh X-Received: by 2002:a05:6a00:1908:b0:525:5dad:cb1c with SMTP id y8-20020a056a00190800b005255dadcb1cmr14612114pfi.47.1656333198246; Mon, 27 Jun 2022 05:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333198; cv=none; d=google.com; s=arc-20160816; b=PkzvNnfexwKNdkJILYgHeCIMW6GDdxREponyIqpezrp4D0LiFuo4ryM8N8n0I+VFol xRp8JAWQNvkDsbbs58B40GvgWSQJ5pxyj8eExVjvE6g/DkdvjUguxEULSyExrmAuyVzq 2GfBjmDPCiuTnsB12QHi0R0/KdAWTm/Kqd4avIWOWUsu8q4TK/fPomE/BioiYBg13r8l jB9gLtzujebtJQd7jtFsB3j5bsYlcIm+MU/XwCEkoTxjBaRr7S+PPGR775D1dvtYCVL7 xWfnOosh6heOuvsxkfbcGOM90XbqzT5eN8GJEshqm/QMHpj8WYV9LM8UwOqIi4g7N7PE Gp/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=im7fhLqTqhO5Lg29cFyRg+MYNK3SOic8TaOuLcdJ824=; b=Z6OEY1ltF4pan0PG1Nfz2p+7FfxWVgOSZpCnpaB49Ni+84wydzL6sB7H/2ui7AHpT1 cVPjCVwTpAUibFfCV4GQ40KJXlIvYlmd3Y4BEZXNxu2wgxxAUtGc03Pk4sP5KFGdlfso 15ZP31UsyVbRKo1yRm6a7SASPNjbhURnH/1pHO3qnlxIeJekt3bbavSUKgWlbeSB/l+2 3391gCDb59A4s3keuAB85WegBbpXrhwnuK/dAjLiCxjAEFDbYSeeQXoBS6qRN6y3fOD1 5yeIOP4JGH2Ag773ZdQWQ9Z0Efi/Rq0ndes8HG8t/Rb/F8OJ+iQbOgjrVI8y8Wwu1DJO eCVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sNBm2t96; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a170903228900b0016184b32d35si8219819plh.174.2022.06.27.05.33.06; Mon, 27 Jun 2022 05:33:18 -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=@linuxfoundation.org header.s=korg header.b=sNBm2t96; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235149AbiF0L1i (ORCPT + 99 others); Mon, 27 Jun 2022 07:27:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235100AbiF0L0l (ORCPT ); Mon, 27 Jun 2022 07:26:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D85D65A2; Mon, 27 Jun 2022 04:26:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F14DFB8111D; Mon, 27 Jun 2022 11:26:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DAD6C3411D; Mon, 27 Jun 2022 11:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329184; bh=XkIjSxMD1GD+nza+SZHqB4Fp59xxgyuTjT9wzg63mY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNBm2t96gmf3a9HaUX5B0XwzL17WcBOIQ0eBuevkP1Wl6WszD8V8DCGfcuVXRj79a 2BUZ3kOaOESQBCG77DgellC56NT6n5dqMlOWQ8E+4RwDzO8DPEdc+UCFN0R3YMsrCM Gtua6RYbe3u6mYOHcuu2MVfqzoXYwv9Q9dC01ONE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zheyu Ma , Linus Walleij , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.10 077/102] iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up() Date: Mon, 27 Jun 2022 13:21:28 +0200 Message-Id: <20220627111935.752615960@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Zheyu Ma commit b2f5ad97645e1deb5ca9bcb7090084b92cae35d2 upstream. The driver should disable regulators when fails at regmap_update_bits(). Signed-off-by: Zheyu Ma Reviewed-by: Linus Walleij Cc: Link: https://lore.kernel.org/r/20220510092431.1711284-1-zheyuma97@gmail.com Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/gyro/mpu3050-core.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -872,6 +872,7 @@ static int mpu3050_power_up(struct mpu30 ret = regmap_update_bits(mpu3050->map, MPU3050_PWR_MGM, MPU3050_PWR_MGM_SLEEP, 0); if (ret) { + regulator_bulk_disable(ARRAY_SIZE(mpu3050->regs), mpu3050->regs); dev_err(mpu3050->dev, "error setting power mode\n"); return ret; }