From patchwork Thu Apr 14 13:09:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 561898 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87549C433EF for ; Thu, 14 Apr 2022 13:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233724AbiDNNWU (ORCPT ); Thu, 14 Apr 2022 09:22:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243993AbiDNNUt (ORCPT ); Thu, 14 Apr 2022 09:20:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7942A95A3E; Thu, 14 Apr 2022 06:17:19 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D1FD26168F; Thu, 14 Apr 2022 13:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3EA0C385B8; Thu, 14 Apr 2022 13:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649942238; bh=/LOOwWxADR70oUQ6lKCBYnij1x7THp3OofmlkedM3f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C71H+RWfVlr/TK8wWdLvaw1sghFsL2D/J1r6gRN4RB/dXVtiEIZsN4zOcaAPK2wa1 Tvixnew0JNXwEQRQz3PIjX/Q2A2T1FgIGZtt7LiyFiBYgui0IKnzSUc58egPJ3ae/3 aQ8BDtIoq9Ebuk61GG0zIvpAKKzOfNgsJuk3VnIw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Lad, Prabhakar" , Johan Hovold , Hans Verkuil , Mauro Carvalho Chehab , Lad@vger.kernel.org Subject: [PATCH 4.19 062/338] media: davinci: vpif: fix unbalanced runtime PM get Date: Thu, 14 Apr 2022 15:09:25 +0200 Message-Id: <20220414110840.663615979@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110838.883074566@linuxfoundation.org> References: <20220414110838.883074566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Johan Hovold commit 4a321de239213300a714fa0353a5f1272d381a44 upstream. Make sure to balance the runtime PM usage counter on driver unbind. Fixes: 407ccc65bfd2 ("[media] davinci: vpif: add pm_runtime support") Cc: stable@vger.kernel.org # 3.9 Cc: Lad, Prabhakar Signed-off-by: Johan Hovold Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/davinci/vpif.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -496,6 +496,7 @@ static int vpif_probe(struct platform_de static int vpif_remove(struct platform_device *pdev) { + pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; }