Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3728766pxb; Mon, 24 Jan 2022 16:31:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0rFlrxfYKYPO+gRY2EgS5maOfwILftYEs1SWYe0Zf5ahgBbWSPVHHLWE1ccBr8OCoGJog X-Received: by 2002:a17:90b:4785:: with SMTP id hz5mr888257pjb.12.1643070676075; Mon, 24 Jan 2022 16:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070676; cv=none; d=google.com; s=arc-20160816; b=OlGye0963Z8EXRM5eW+JU5AvwMfujMUh+7gVISi6u/xsY2gHHTSltdVK9JkyDM3p3m zW8g5EDzZrLuuaN+cUBZp1V2+XupzCsy/YEP82Bk8BwYJeeHVF3oMQ5ldEpTD/RZ2KBd do43n/8E7dJsE8OQcNi9hwxF5txfHWDtBHbkp6rIWWf/KcQPbKpSuYWDNYfFFhI7VBVC D1gN0YejilDbPhd07fayGnMruPvC/wi3K7t788X5JTqoxR8ni9ACOrohw6eU64y3L+Yn dBBOLPzp9Ubxf9obPDnqRNT1oPZ3vHLw3SXltl6/cfhLmhiq8EI+EXJPL8sE20MCJDDE VOKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bwHJqmVV1Dy50D1dJcbBZJWv0yKirvI6FnzcnSdSa6k=; b=bfrXIoukBq49Jvd2S8gnwAOke6yol8wvSd1dsUzyOMGxj30Sz2lcqN6DYUBLIYaeL3 PwlpK4C0LBFC7wz1fJ0clv5h/EnrALKC5HBVODfmphnEqcfksrnYJGbjgUd7REa0lREw /jHhrqqu7OVyAm9I2aHnimq70RhqVaC4dML0afDGI14heAA7019cMcJZpbD6Mdq2O3Pb 9Y+jYXD0y8KITUAv1e+xgRsFzzBExOIzZSZ02bL/luPlGxd66T4hDd0S8ti0XDvF8ERR RDbjmfGTDMfPxuYJD5tgH47XH/xBiWKMHGI3ePp84j+l56FpXTkEswUmxpy+usENi0ql qRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rYx+Xgn5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si14941395pfl.173.2022.01.24.16.31.03; Mon, 24 Jan 2022 16:31:16 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=rYx+Xgn5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358244AbiAYAXo (ORCPT + 99 others); Mon, 24 Jan 2022 19:23:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1578620AbiAXWDL (ORCPT ); Mon, 24 Jan 2022 17:03:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04FE3C036BEC; Mon, 24 Jan 2022 12:41:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9953B61548; Mon, 24 Jan 2022 20:41:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 719A7C340E5; Mon, 24 Jan 2022 20:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056902; bh=+AaJ2Kyc9/AN4fMiQbu1GuSehzeuq+HaoOnzLpJMD20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rYx+Xgn5VObElOyZOVszM5x1MikZLEBN2V0kzEWXDMwAcSQWu2OdOh08C3LadcVeh zEhyXU4DbIM8+QCjYkCEzdo/cOHoFLMYtY5gOdnYgpRi7jHTMV6bXPkZs3qQdIQCKp FqDEftjshnbUOXV+Up7tyJIzFXG9uhqWIX5n7v6Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gilles BULOZ , Srinivas Kandagatla , Sasha Levin Subject: [PATCH 5.15 637/846] nvmem: core: set size for sysfs bin file Date: Mon, 24 Jan 2022 19:42:34 +0100 Message-Id: <20220124184122.998895115@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 86192251033308bb42f1e9813c962989d8ed07ec ] For some reason we never set the size for nvmem sysfs binary file. Set this. Reported-by: Gilles BULOZ Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20211130133909.6154-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/nvmem/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 8976da38b375a..9aecb83021a2d 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -307,6 +307,8 @@ static umode_t nvmem_bin_attr_is_visible(struct kobject *kobj, struct device *dev = kobj_to_dev(kobj); struct nvmem_device *nvmem = to_nvmem_device(dev); + attr->size = nvmem->size; + return nvmem_bin_attr_get_umode(nvmem); } -- 2.34.1