Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1203548imm; Fri, 29 Jun 2018 13:21:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQ2h1L9Coxe9Y0dXKlANvc8dR9Pf7nu2s2pQx5HtE4NXxPK19+d8G3SiB+1a1gCYg5ebiM X-Received: by 2002:a65:504c:: with SMTP id k12-v6mr13818346pgo.435.1530303682518; Fri, 29 Jun 2018 13:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530303682; cv=none; d=google.com; s=arc-20160816; b=ByN3NFWCNyxsPupkj/DQ4qCh5DQcJHzZ/dHcdDspAT+EnrV30FEJNng0BBSaeUIUYC LdNJDxo9/J13he6EMTk4K4hKeXeWV6+ElUyi5Ws48LVUmeR5nJEBGxwL+1cTasFBQcYp 9bYM1cNi24Ykm/YzPml3dvTcjvasie8gXdx3gER2CkuazNTOWkyXW/E1FiDXXR+57t4M 1JfGo1PIgVc7Q6hJFNTfwMJeb6TfHJZqV3GBhQKibsrQuYIQObHzB8UDeAlIiP5zEJRh F3X8/IaH1NN65oZSdAJYSvjRd1reIKK6q//jz8ms2JSIp6tY3OFh2yvN84KTK9goMQH3 +vOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=Sl25PIM6Y4ogt9lxZ5XiMqFmTZswgAfnWJPT5UhQCdM=; b=pZ4U7mlO9CozU84NjN7QM7stZOTmr4zYl96aevnGmoteDTeijoT0znzep8agfpY5gZ oufOwvFzdcZKCGmJlt5aQIEfd7xtr2NAv1oMg20tP5jEF2VD3iIvtc2gHvLoLMt1T4QL GOOSfAAN9jn1Pfx1hyHT5etZgEKf+ZIOoET3CdVHLeBmriK0Gj6D0U50JVXWbM91TcS9 MwxeAxNn8zHjSa/rQP2kVxCu6waSy3xzUDkEp4nw5JBFY6EHraScjCP5Mtv/jzWm8zUZ 5IM7VY/5p1HAcVfcJBYWeY1dlRuwXUBUZP1BuY1FKjczW/JdwNO4MMt4wuDntitW5Qnq cTkQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7-v6si9076337pgf.58.2018.06.29.13.21.08; Fri, 29 Jun 2018 13:21:22 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755373AbeF2Shb (ORCPT + 99 others); Fri, 29 Jun 2018 14:37:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:46592 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752683AbeF2Sha (ORCPT ); Fri, 29 Jun 2018 14:37:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 24873ADC8; Fri, 29 Jun 2018 18:37:29 +0000 (UTC) Date: Fri, 29 Jun 2018 20:37:28 +0200 Message-ID: From: Takashi Iwai To: "Nicholas Mc Guire" Cc: "Johannes Berg" , , , "Jaroslav Kysela" , Subject: Re: [PATCH] ALSA: snd-aoa: add of_node_put() in error path In-Reply-To: <1530292062-31567-1-git-send-email-hofrat@osadl.org> References: <1530292062-31567-1-git-send-email-hofrat@osadl.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jun 2018 19:07:42 +0200, Nicholas Mc Guire wrote: > > Both calls to of_find_node_by_name() and of_get_next_child() return a > node pointer with refcount incremented thus it must be explicidly > decremented here after the last usage. As we are assured to have a > refcounted np either from the initial > of_find_node_by_name(NULL, name); or from the of_get_next_child(gpio, np) > in the while loop if we reached the error code path below, an > x of_node_put(np) is needed. > > Signed-off-by: Nicholas Mc Guire > Fixes: commit f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa") > --- > > Problem located by an experimental coccinelle script > > Patch was compiletested with: ppc64_defconfig (implies CONFIG_SND_AOA=m) > > Patch is against 4.18-rc2 (localversion-next is next-20180629) Applied, thanks. Takashi