From patchwork Sat Aug 13 08:57:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9278365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86E2B60780 for ; Sat, 13 Aug 2016 08:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E9E828AD5 for ; Sat, 13 Aug 2016 08:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E2F628B18; Sat, 13 Aug 2016 08:57:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4C8528AD5 for ; Sat, 13 Aug 2016 08:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbcHMI5d (ORCPT ); Sat, 13 Aug 2016 04:57:33 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34817 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbcHMI5c (ORCPT ); Sat, 13 Aug 2016 04:57:32 -0400 Received: by mail-pf0-f195.google.com with SMTP id h186so664907pfg.2 for ; Sat, 13 Aug 2016 01:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nL6rVjDLeBKBb66SXUGSdEfPWEDRje3Kv7TC8x/exo0=; b=w3uAcWoZYonfrpBsBjB6qk8r27yiyxuETI6Mez3oVbCX3yWgRuaHUCRoi1jB2BPaWH HVxnxV3RdPmckvzFe3USWGdrm0lXUsnlvM4tqMQL5e1zn0GIUBPiGgEqeQtIO1c6kLuY 5c2oldFvU4z0a/xxQwQbVjEy+0w8xB4X7uq7AMK1OcmGQ2ch0JGhM115KlkgfDniSdxz Fs7czBRyxU7d0QMqeQtVvCoWfY8kDaYPiCVQOU6JMbs71z5UJpJVFX1H3O/25DnivkzL +3UzZFaXNFS/JmwiAl2xBWYaJKk6OJdvjh6WHBHQPDxHLLtEPgncslvIM4rsAYCHNGKc 7qiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nL6rVjDLeBKBb66SXUGSdEfPWEDRje3Kv7TC8x/exo0=; b=FWSwjt2wq1FloKwdGad6OYquEQriStKoK37Te+uXc13WQrBOqpfPOOpwHsM6U9hDrs EMGUl4JiCq2WXvCMv1YT0WMj1S9X/Pm/IMJg+1NZq14IyRtq0qgPDMflgtGRyWWX8BVi ALq90u0WB8Ex+St1QrhMfRLkIUSltUG3tGnBOJASvBbnkxR3kRvm4CrOJEmXBaga2V4X 3IuSX1fl41SktF+cGx/YuG1x/jt0TDeiILuHpHMajrxTM1kda1g5iMVqAE0hGDjOCxri s3lkl0dNBCb4eY/goSddc9lIY2F61dOIp5kksrz8N02LE5Ukw8nTTTD8YdiLLM2uIjPg Eu4Q== X-Gm-Message-State: AEkoouumY80acn0F/Qp/G2MG/hCIDx0G7PxmWLF+fIpGBEIKtnCpmDzTwQaqMAL/+o0XjQ== X-Received: by 10.98.102.79 with SMTP id a76mr34783299pfc.75.1471078651807; Sat, 13 Aug 2016 01:57:31 -0700 (PDT) Received: from bogon.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id 132sm18592695pfu.6.2016.08.13.01.57.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Aug 2016 01:57:30 -0700 (PDT) From: Wei Yongjun To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dan Carpenter , Viresh Kumar , Robert Jarzmik , Ingo Molnar , "Luis R. Rodriguez" , "Rafael J. Wysocki" Cc: Wei Yongjun , linux-fbdev@vger.kernel.org Subject: [PATCH -next] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info() Date: Sat, 13 Aug 2016 08:57:23 +0000 Message-Id: <1471078643-4815-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This node pointer is returned by of_graph_get_next_endpoint() with refcount incremented in this function. of_node_put() on it before exitting this function. Found by Coccinelle. Signed-off-by: Wei Yongjun Acked-by: Robert Jarzmik --- drivers/video/fbdev/pxafb.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index ed41fdb..ef73f14 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2186,6 +2186,7 @@ static int of_get_pxafb_mode_info(struct device *dev, ret = of_property_read_u32(np, "bus-width", &bus_width); if (ret) { dev_err(dev, "no bus-width specified: %d\n", ret); + of_node_put(np); return ret; }