Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp640476ybz; Wed, 22 Apr 2020 05:18:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIT5ioodrp3eXxUIzH4G2YyHvb8BCFcajD1I3RWaYh20ObAaJr84xFkUBQSY0A8CRJ1htU6 X-Received: by 2002:a05:6402:3121:: with SMTP id dd1mr17788215edb.168.1587557925650; Wed, 22 Apr 2020 05:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587557925; cv=none; d=google.com; s=arc-20160816; b=L2VSOF9goNOQF2FIlNHifOH+lsEQYhOFvZB8P5RjT6jXo0p1/FrVQ9zCqDltxQy3Ml W2hF6Kudy1TwEggs4ko4DoOGk6P/gkGvmXJ+kbpLL7pGFe590Ds5SbjcGenRX/7w5q8K sWPrUWM1Zg8v0bn8r0cKvrQTpDe0j2X0ufwuadvFZV7icZ2TsTC4CBpOK3Soo4kwpHLg Dz8qQI12dY6VKextKOW/8/eazCCBuGDDirw0b2fDiN86+ayIFFsRqdMNJPHCyE6wR/HV obVNuY+Xa19HAWWRFa84/cHzDtm93LXzbhGPI7wKBv4MD/XN+ncw2YRCtMsecGhkZ554 doVA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=edlF0dmzpPDYO2XcsMu0IVoca10Voqpw5lyWzcz2Eto=; b=wugzeDY3T9W126EE8O8LFt7Ng0+cAU4DJpsIsH2o5kCZC9eLaaj2GZNUbURil6EHeH sUl9YvuUNp6HPyW1PKs6tVFk5EnOfov+HQzdQEj7pF+VNznCDy1NlPSZrQyhnrO2GVMZ BT1iUEbxARL2yzCK6x1HumP+OO9Aj1Nn2rOU+UGAMHValUpcLyBLca9HkRGzA0yRHArn UByEBSxM3D86uLbKNrmWxse9UF04vctxeJy9DymantGd/tKHiwHE3koiPF8eee3pEqTS QR6FHjKDgN8ewKo3BeK/KyVJE3jsd+f+bYw3MXh6QsY/xu5/7QtyLpoJMBMB7bX7rCwx Un4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cANmiraU; 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 lc17si3620876ejb.413.2020.04.22.05.18.22; Wed, 22 Apr 2020 05:18:45 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cANmiraU; 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 S1726942AbgDVKCL (ORCPT + 99 others); Wed, 22 Apr 2020 06:02:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:50994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726928AbgDVKCI (ORCPT ); Wed, 22 Apr 2020 06:02:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 767032076C; Wed, 22 Apr 2020 10:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587549727; bh=xS2qjSIVlgxZaq79xMVbraTGF6inSfpcUVhPZC/G+uM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cANmiraU+XYfNHZfuX5JokDXKQ7+U8JiIz5Jq8yuAWOa/o9WxRCCE34+Y8DKFRtJf MfGohxlHoAMODr2iOyEEO3MfUnUHADomJVgI6xvBUGpZgDjee03Zbrdp75qp0NPdmJ xg7GawFfw3XSouY29j2XHO3I6g6SfkqUXdo6h9/U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Nicolas Pitre , Frank Rowand , Grant Likely , Rob Herring , Lee Jones Subject: [PATCH 4.4 082/100] of: fix missing kobject init for !SYSFS && OF_DYNAMIC config Date: Wed, 22 Apr 2020 11:56:52 +0200 Message-Id: <20200422095037.805280812@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095022.476101261@linuxfoundation.org> References: <20200422095022.476101261@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Herring [ Upstream commit bd82bbf38cbe27f2c65660da801900d71bcc5cc8 ] The ref counting is broken for OF_DYNAMIC when sysfs is disabled because the kobject initialization is skipped. Only the properties add/remove/update should be skipped for !SYSFS config. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- drivers/of/base.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -167,9 +167,6 @@ int __of_attach_node_sysfs(struct device struct property *pp; int rc; - if (!IS_ENABLED(CONFIG_SYSFS)) - return 0; - if (!of_kset) return 0;