Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp1030654ybr; Sat, 23 May 2020 04:51:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytIG6vM9mE9foiEoA8LL6ztSLWtLbBkGHBNpxw6/ihMDRJhH6jV/2TDcud8MlIiv28yAHO X-Received: by 2002:a50:cf4c:: with SMTP id d12mr6778810edk.121.1590234699605; Sat, 23 May 2020 04:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590234699; cv=none; d=google.com; s=arc-20160816; b=kG0MMM92WPZoIxURY0t/hMZWFFAt9cuPigcHjCT/jaCEncJIosJ8ZR+LGVOK0YLAYg sMx+dYvo27ChfgrV0tUI4fQkROdLWshwaXk/B9MmOSTBMVqFenaSFM8pGFxdNWsuCBC5 CKmjqYEWR0GhzG4O6h+2t1lrWpS+g1nMN/mu1pqYA9NbK+RWvskDLY2S+imBBqkXZGQH TcL53iMpP0H9zU7NG5jYvbC94zXnCeZbbUlW3FXavUj2oQEUNN8ukE0w9rhRRqlKfdDY 4veah8y1oPtVoHHnf25ttxYWGcW6dkr6S6u1KUAJwIC9cbR4VtF2F/v4Z5bgnIzeTlUG Q/5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=7wYvJtZa+lC6gvARE7c6ifxe74lNMi0pValmRywrajM=; b=KzYLINvASmPpDayupAmN3BClLeKVTykNI+hGWh0f1yQsgNnTvseFqxYmIJtCNmo6vQ bv1A/pnHpS89XG0hLWItaEWGNFxJKhHnPUWG2mkCea4uoVjIQDlnuMH74A1SlGddUJDk 90/lFPB36jfmzNONyJ20VnFJb+efD0sZA8eWPNGmYPdmEDgksgNrbAsnaNPm1oT76JHh b2nxLRRNske+p3xURN6qkCL2iv0z5vIt3LGe2eY2BCyOy99O/ysIeKdWKDZqgkKc6SS6 wNj1iWmFuSyged5c3biFckOWwxTPfHBVf+NneJgmjLbOSkg9iwp4vU2OgXdPuJmvGEPt qndw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si6015201edl.169.2020.05.23.04.51.16; Sat, 23 May 2020 04:51:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731233AbgEWLta (ORCPT + 99 others); Sat, 23 May 2020 07:49:30 -0400 Received: from mail.zju.edu.cn ([61.164.42.155]:21268 "EHLO zju.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728749AbgEWLta (ORCPT ); Sat, 23 May 2020 07:49:30 -0400 Received: from localhost.localdomain (unknown [222.205.77.158]) by mail-app3 (Coremail) with SMTP id cC_KCgCnr0O+DcleSsv5AA--.10191S4; Sat, 23 May 2020 19:49:22 +0800 (CST) From: Dinghao Liu To: dinghao.liu@zju.edu.cn, kjlu@umn.edu Cc: "Lad, Prabhakar" , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: vpif: Fix runtime PM imbalance in vpif_probe Date: Sat, 23 May 2020 19:49:17 +0800 Message-Id: <20200523114917.18222-1-dinghao.liu@zju.edu.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: cC_KCgCnr0O+DcleSsv5AA--.10191S4 X-Coremail-Antispam: 1UD129KBjvdXoWrKw4UCw4UCF45tr4DZr48Xrb_yoW3ZFX_uw 1FgF47Wr1rtr1qyw4jk3yfuFyavF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List: linux-kernel@vger.kernel.org When platform_get_resource() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/media/platform/davinci/vpif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index df66461f5d4f..f28c1b27eac6 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -458,6 +458,7 @@ static int vpif_probe(struct platform_device *pdev) res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res_irq) { dev_warn(&pdev->dev, "Missing IRQ resource.\n"); + pm_runtime_put(&pdev->dev); return -EINVAL; } -- 2.17.1