Received: by 10.223.164.202 with SMTP id h10csp3693244wrb; Mon, 20 Nov 2017 03:35:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMaivupSIJS3kAlOLAjmQ5ZyLJ9pHZlhLa9wDxlHgzY7kzLuyUkROHGNa8oq2OdqNX1b2JgY X-Received: by 10.99.99.3 with SMTP id x3mr13077351pgb.414.1511177707229; Mon, 20 Nov 2017 03:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511177707; cv=none; d=google.com; s=arc-20160816; b=YZoygtawukl//HuyVj1Cx2ef2sZBjQ6P2tm7nAAZ2MeI4QvEg2bhICTqycqXPnEbYk PxQMpDEkQxXsq20eUiRyPlH1hTWr+g1EpVczwOgRfL9KuE8apDZIaMX21lIeOSDfvQeN w/lTWQZ09rlBJf3X9BASSCVnzl6CrFJNk4HFUu5E10j6ylM2dUmUT9hZIQ3kITRl85iO /RrKAJxPL1p8gdI8jR2yRwwV7up5ncEGzHgFoOEctep5o53x7qzJcOkCWjx1LXPPEYC6 /o7oQpEm6iIoE2iIjTo7JH25U5MPBoUXos5uHjo3pIoWimA+RLwYMXVV5EiMdG8Vqw3o wR1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=jziuZuVYNZG2C67I2fakeTWj/OjfZMdxo8eTmM1Xlwo=; b=sxUR/9xu4RLz3dTadyExXDooe2HqkbaCRNEm2SGCtWGEyPwf6NPrC4/RD3hV0bkagm j3knOJxy/b8yOezklNvM52YFRtCjBpDqVnwNCemmV+4dOAz6zPH/dL/b3AwqnELKbfMQ JKY0+now5Sl5Sd3PFFpjZlvop/P7XYgiH6SFXFcAoe6C4a5qCSIMZqpnBq+0cYmoWOnD SZTmPjjKUJ4vKZIqiVXO4kqXPpJBSPdkMKRh4dyIIpyEaRbiOTG/0fNyGzkTyjEL94SX GDnHifeyMlsidTqeG3MzfWmXMCWryYozgqdnq+sIxPU3bshd1/JlU+Kd3dnes4Lm/aM4 64ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CT+cACSE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j1si7828936pgt.798.2017.11.20.03.34.57; Mon, 20 Nov 2017 03:35:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CT+cACSE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1751215AbdKTLeD (ORCPT + 68 others); Mon, 20 Nov 2017 06:34:03 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:44855 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdKTLeA (ORCPT ); Mon, 20 Nov 2017 06:34:00 -0500 Received: by mail-wm0-f67.google.com with SMTP id r68so18209363wmr.3 for ; Mon, 20 Nov 2017 03:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jziuZuVYNZG2C67I2fakeTWj/OjfZMdxo8eTmM1Xlwo=; b=CT+cACSEXMiEdIJu1mez8LTbZ7aTGXwRzfbI475c7OJwXbTE61L0AebX32qC3Q/PN1 VeSMAcuGFQhjSJUu4ew3XiySWSD7x5a1/cbPPzAY80aGiMaos4OFkt1XgLbwjGEAvOmS PS+WSMMaPQ7xsnetbWPTrHdSh3MopGxnfaxLg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jziuZuVYNZG2C67I2fakeTWj/OjfZMdxo8eTmM1Xlwo=; b=WiljoPHkyrYIleSvXxWwlwdym1TncK1r2hqBHHzGLQqpFpY1MGmxpM0FDEfAP8SI0u JTJJk/Wo5sB2dX71miQLEHjy7GD58Hxm+u0T09/1rC95/gWmf6BcvlHnKEEU/eNJDDGT BdUZ6UOIT5u+8ZRsL6jFQr3QnLlkPaQGSkedI/OUUsFP1frgLqS1S7W+Hv7jNEg9Hzgb IRkOAmAWVmkVUJvoBDUV6KEVno+KaG9dfdTm30ORIFEN0KMHBFn5As3rJPFQe15Sey7/ mswAdFJS9QfX9AP1190Sq00i9IrcnK+Za6YsCVwU7luMjPJMLaW3VNfFaoKuYsfqY5K5 XzZA== X-Gm-Message-State: AJaThX4XSH29ClIgUDWRFzkZmxnxe3uEC7z/YFKX+LmFye8RAOkLotTg Be+PS7OHwgAyxcGHJqzZgdvm5Q== X-Received: by 10.80.212.195 with SMTP id e3mr18273881edj.263.1511177637665; Mon, 20 Nov 2017 03:33:57 -0800 (PST) Received: from [192.168.1.24] (cpc87211-aztw31-2-0-cust196.18-1.cable.virginm.net. [82.46.60.197]) by smtp.gmail.com with ESMTPSA id r15sm8443542edi.52.2017.11.20.03.33.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 03:33:56 -0800 (PST) Subject: Re: [PATCH v2 2/4] backlight: max8925_bl: fix device-tree node lookup To: Johan Hovold , Lee Jones Cc: Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable , Qing Xu , Haojian Zhuang References: <20171120104547.2639-1-johan@kernel.org> <20171120104547.2639-3-johan@kernel.org> From: Daniel Thompson Message-ID: <3ebb4003-bc12-2da2-5b04-caeb3bcceafb@linaro.org> Date: Mon, 20 Nov 2017 11:33:52 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171120104547.2639-3-johan@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/11/17 10:45, Johan Hovold wrote: > Fix child-node lookup during probe, which ended up searching the whole > device tree depth-first starting at the parent rather than just matching > on its children. > > To make things worse, the parent mfd node was also prematurely freed, > while the child backlight node was leaked. > > Fixes: 47ec340cb8e2 ("mfd: max8925: Support dt for backlight") > Cc: stable # 3.9 > Cc: Qing Xu > Cc: Haojian Zhuang > Signed-off-by: Johan Hovold Didn't I already ack this one? Acked-by: Daniel Thompson > --- > drivers/video/backlight/max8925_bl.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c > index 7b738d60ecc2..f3aa6088f1d9 100644 > --- a/drivers/video/backlight/max8925_bl.c > +++ b/drivers/video/backlight/max8925_bl.c > @@ -116,7 +116,7 @@ static void max8925_backlight_dt_init(struct platform_device *pdev) > if (!pdata) > return; > > - np = of_find_node_by_name(nproot, "backlight"); > + np = of_get_child_by_name(nproot, "backlight"); > if (!np) { > dev_err(&pdev->dev, "failed to find backlight node\n"); > return; > @@ -125,6 +125,8 @@ static void max8925_backlight_dt_init(struct platform_device *pdev) > if (!of_property_read_u32(np, "maxim,max8925-dual-string", &val)) > pdata->dual_string = val; > > + of_node_put(np); > + > pdev->dev.platform_data = pdata; > } > > From 1584581704719398013@xxx Mon Nov 20 10:47:54 +0000 2017 X-GM-THRID: 1584581704719398013 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread