Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp563167ybg; Wed, 10 Jun 2020 07:55:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjoOxeg4ycfDALO1oZaXTKMJ4BX+PTaUZHS60o0kSIBsxywV0A8ypXlQ6gJDtQZih/p1/l X-Received: by 2002:a17:906:138b:: with SMTP id f11mr3672778ejc.288.1591800905377; Wed, 10 Jun 2020 07:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591800905; cv=none; d=google.com; s=arc-20160816; b=mIk2FUyHUNNzegfIdHuKpTYPj1fiGR6BqFIZx3s2wfn+LKPoOlIT9ep57HRdxRISLU bVj+hb1tWTn1Tkg4vSwfC/VCxchiu5eCETjwp4OLG6n3RheT6SGDculcRFWgPxdjYn3c doZcZLmlnLwKDTwgGoUXQ6MzSzY+CuiHSKYSMQRoIIeFNZ6dfpyys/nRnWkA8LTJYV2c QQAsrKHCvaQW0ZmIxXUtojSU7KN1EDJxsf7udA23N4EfLLro7pysAk/T0bwY6s+yo+OU evtEMs3LEc0M1WuJJDqVws/n6jT3w38IvZJLC9Z6CMt6W9qWpA1NK5+hCTOux9FHfoBB MMEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kxWY8XEbn8Ok7oBcgLQpTmQYtx8Wj0QtOJ7t8WxrgPg=; b=wer60u+PHS79sCLTgQ0qWYR1ZjrtGQMOSOqqFavKJG1zjTUnant0HQDgI+9q79CLFv 3yyH3F3HdOmKvwrQGRHd3TBfcna1XNxILI7ldDQ740fNlH317AEgsRsHCgcC59RQJCI8 4D2Yuf00zChGMrlNKdqFoPi1bq4O98PXqBDY8ODsE8iJqxfp7lanS5MWY46AXnDr/BMh 9ggPVG3dxZVklD3p0tKNXGMzdYCkCVQAwa3ZJlSPibnjAeL12ET6kjzRdWDvT2FkNZtb 9ToLBiuXNXtlor5kVR5Tc9mmFqch5xohL6QM92pDC5sSDLD7P1Vg+DYOEACGdqfMPrkb K9PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SA0tA79F; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs21si13866883edb.87.2020.06.10.07.54.42; Wed, 10 Jun 2020 07:55:05 -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=@linaro.org header.s=google header.b=SA0tA79F; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbgFJJSd (ORCPT + 99 others); Wed, 10 Jun 2020 05:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbgFJJSc (ORCPT ); Wed, 10 Jun 2020 05:18:32 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44B49C03E96F for ; Wed, 10 Jun 2020 02:18:32 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id z206so1026562lfc.6 for ; Wed, 10 Jun 2020 02:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kxWY8XEbn8Ok7oBcgLQpTmQYtx8Wj0QtOJ7t8WxrgPg=; b=SA0tA79FKZd+CfHK9ZNdbyhLb3iBKdMTTc6eqhkv2AqTV9tmVctiypXv2oeTr2DRVl 8Gs+ZcaQk1LUtH01XFyKgZ9jt8JjK6qje50D9wkKs6MT+eZbj3cNiKvXm+QulUk7UMpe seKygmpDw9VP5DzIrqwANaflh6+C198mG6CF22bRMXmWnhEcYoUzaoxuM7NEwVuS6CrP YOrYw3b9KI34l3SMG65yJW96gGEFhFb1JxzARzMRLIsrMr5F2maCTGld4jLTOGMW7Vkj +I0vSWFzy8i8BrJQrWA0lrK8+dmGiXhjR+sN9nGRz0Mlw9PPqC8wf+qDRi1Pf9X8NO4U ZRqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kxWY8XEbn8Ok7oBcgLQpTmQYtx8Wj0QtOJ7t8WxrgPg=; b=P/CS+YJHEzVBOLe5Tu9f8PWxrDzzYVE+T1lV/pzU5w8atZ8pno0qD6DbfEfVc684fs DqHHr3kVqATXjMUMkTszjjuz3YTOXscrthKy/IJoUju36FhOeNVrKwm5suad3s3Ay2KR lZs+i3L6cwNLSJU7HZGi6/6BJsaFhS73nSoCKSk8wgMTB9EoVxi4qoT+V32LG0Eldxnw udkQAa2vwin/Sn8U/u8yjp7iDjSUFsqS9DqhVRG8qDAl0tzFKErcADJYwXa8POuBoltk WY0BYRt3Yy1YSL8KawPk6Dl8qbHcAwYF3NPsQbcnTFTzBvrMai/iR+1olgBJB8hiYaUo pLFA== X-Gm-Message-State: AOAM532s3V++Y7VQPJiILIOKK35cZ0pzgl2c76A/3dZ2sYCNXc+LvYUi YxNXZyzRlTcJmTu/iZ5wVMA5Ls8FAItfUjLwWb3HQg== X-Received: by 2002:ac2:4823:: with SMTP id 3mr1194962lft.194.1591780710628; Wed, 10 Jun 2020 02:18:30 -0700 (PDT) MIME-Version: 1.0 References: <20200605025207.65719-1-navid.emamdoost@gmail.com> In-Reply-To: <20200605025207.65719-1-navid.emamdoost@gmail.com> From: Linus Walleij Date: Wed, 10 Jun 2020 11:18:19 +0200 Message-ID: Subject: Re: [PATCH] gpio: arizona: handle pm_runtime_get_sync failure case To: Navid Emamdoost Cc: Bartosz Golaszewski , patches@opensource.cirrus.com, "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Navid Emamdoost , wu000273@umn.edu, Kangjie Lu , smccaman@umn.edu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 5, 2020 at 4:52 AM Navid Emamdoost wrote: > Calling pm_runtime_get_sync increments the counter even in case of > failure, causing incorrect ref count. Call pm_runtime_put if > pm_runtime_get_sync fails. > > Signed-off-by: Navid Emamdoost Patch applied for fixes. Yours, Linus Walleij