From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F25AAC433DF for ; Sun, 14 Jun 2020 12:11:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8AE520775 for ; Sun, 14 Jun 2020 12:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592136681; bh=XTBiMQpQExQTRHcUm9UqrBARaxS/G2sHP64iAMRYo4E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=XhiO0Ajs5X6GDyxj68OkKYFcSgZvo1ALrIZlkyfnPzC3PcSVO51LLVa85EfUtAhK7 F5a3/S2VKVVgPDLWLDVYQ5hYJQ8JQhlYUMA/EwCsySms6JN+AbdyZdPQvLwHSf1S8W v+BoecA9rOPo3b5ZWBAOxca6M54df+wsXbtEh0e4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbgFNMLV (ORCPT ); Sun, 14 Jun 2020 08:11:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgFNMLV (ORCPT ); Sun, 14 Jun 2020 08:11:21 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF2EC20714; Sun, 14 Jun 2020 12:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592136680; bh=XTBiMQpQExQTRHcUm9UqrBARaxS/G2sHP64iAMRYo4E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YP0eaRV7pwsGQQcQ2epO6rf3iJ8YQfrAnjAfmkHn/jLImgLEn/TGo1A8vyW69r4WE LcQozem2ZYzoaAO2MdZRj9iSBv5S+QIDCIhBGHak2QqSS8vcaDwXMIHKgqZByhZ7LG x2WGgMtmjrNSQmTlQa9YMYJT2c2J26iXemJhKIOk= Date: Sun, 14 Jun 2020 13:11:16 +0100 From: Jonathan Cameron To: Linus Walleij Cc: Dinghao Liu , Kangjie Lu , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] [v2] iio: magnetometer: ak8974: Fix runtime PM imbalance on error Message-ID: <20200614131116.143bcf92@archlinux> In-Reply-To: References: <20200526104717.3181-1-dinghao.liu@zju.edu.cn> <20200531150000.20d1ec61@archlinux> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 8 Jun 2020 14:12:18 +0200 Linus Walleij wrote: > Hi Jonathan, > > sorry for missing this :( > > On Sun, May 31, 2020 at 4:00 PM Jonathan Cameron wrote: > > On Tue, 26 May 2020 13:13:56 +0200 > > Linus Walleij wrote: > > > > > On Tue, May 26, 2020 at 12:47 PM Dinghao Liu wrote: > > > > > > > When devm_regmap_init_i2c() returns an error code, a pairing > > > > runtime PM usage counter decrement is needed to keep the > > > > counter balanced. For error paths after ak8974_set_power(), > > > > ak8974_detect() and ak8974_reset(), things are the same. > > > > > > > > However, When iio_triggered_buffer_setup() returns an error > > > > code, there will be two PM usgae counter decrements. > > > > > > > > Signed-off-by: Dinghao Liu > > > > --- > > > > > > > > Changelog: > > > > > > > > v2: - Change 3 goto targets from "power_off" to > > > > "disabel_pm". Remove unused lable "power_off". > > > > Move 3 PM runtime related calls to the end of > > > > the function. > > > > > > Thanks for fixing this Dinghao! > > > Reviewed-by: Linus Walleij > > > > Could I have a fixes tag for this one? > > It's been there since the beginning so: > Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974") There was a lot of fuzz in this one due to other changes to the driver. I 'think' it went it cleanly though. Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > > Yours, > Linus Walleij