Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2418563iof; Wed, 8 Jun 2022 04:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTD6Q9/dLf+smlHbg6aLmWjsQqyIJTsM5WHmy2goEESWcAv2T4SERLLaPOBbepF8z+upBi X-Received: by 2002:aa7:9103:0:b0:519:3150:6b3f with SMTP id 3-20020aa79103000000b0051931506b3fmr34282389pfh.67.1654688555008; Wed, 08 Jun 2022 04:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654688555; cv=none; d=google.com; s=arc-20160816; b=ilaetuar28NdpmDOhdTHt9IdFQc7vYJT9UbeMgH2AH4XZpmGJroNJZVmNcArABquur F9yQeBR2LKWirwIZWefJDpvQhLxnhNCueCVqRvIDHnDcZsuStWXuQ/7y4jq4fspRW+g+ KXgya6GpiJXFWOlwefVKHH/Cxd5OyBrK6/1ulX+6hqjTVcCggdRuNzZZb6lqx/5JVhzo lKixQ/XegSRbEajUKuBGj37Mq4YasB5E5A4BGvNsWl5D0Ch2NutzChEoD387FMkXhPLf cI980k0VtA3UzVFs1avyHhaeKtSOj0+ZJFj/1QQXJQi5AMB0j+tAZcWyXxhCU5qE2qhV V6cA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4ky/7AlXAmkiGk02LlnFYrBc1OfmwGr84RAZ17LR9Mk=; b=qGK4nuXeelQPrwd+S0xpOCM+ZvZ/h2cX2geWt0bP49dOZ3dL6plnyUi1yJODSS/XNK /b47A0YWmmJYHGau/76m0lxCeO7MtXK9uz184b0vZFIcwOfZdQilpnPnrORUMPkt1o0I NNqCNjCnPD3AsqPIkGnRH6AopHRhHlQZdACJl0TmKbZZsv5slPhbIlxNkoTboM+lbGLS /mQiPnC/5BWsaqMnPvgo2ibfrtzJKGSkhJD1EWKFH7j0rZIXubBUTY6PAbVFQWhw6vZ6 D6B0haA3DcVD0rn34ZkHB26APwt33ozXcN8bBl+zUjW+Ljbo7vopouQ8YQAcnhYl2LIq 57Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Twd+zXE+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i16-20020a17090a059000b001cbbd85faa9si15141599pji.20.2022.06.08.04.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 04:42:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Twd+zXE+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D2FD2347CF; Wed, 8 Jun 2022 04:11:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237967AbiFHLJS (ORCPT + 99 others); Wed, 8 Jun 2022 07:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237862AbiFHLIQ (ORCPT ); Wed, 8 Jun 2022 07:08:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5EC02050C2 for ; Wed, 8 Jun 2022 04:08:05 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 7DCECB826EE for ; Wed, 8 Jun 2022 11:08:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65284C34116; Wed, 8 Jun 2022 11:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654686484; bh=nAbRLFK4360U012nvucyvlqxP543Oerph53JukK7/3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Twd+zXE+e5lzG51zZu+JGVvFxl046d+PgY2ChI6Kia+1wKf2gNrMNqL7DvEFlWV/D GUqVHGV3HSDQcOjFgAMTyHPbhm2SFKfKNTrbMyqERNUFk5x0VAAxa4JsH4737X4mtX YmnnT4oOJJgLkLp+JLuC8CUstRf22ydkBwRVblmYPxDgtHocLv3w/vt+Ob1RXSs6po lG7WRzDvVwjEB4LfXp+p0H3IaqbT7zG11VYyFtCULCHSMghxh+NTS78Cm8MMRp+NZM 4N1pMrmD7T+SZjX2kIU62LF+QEPxQQOmS13SGa3pdz9bi6Em1OtDigL8e0l5YVQT3f F69z2h8uZw81w== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, tzungbi@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 13/23] platform/chrome: cros_ec: don't allocate `din` and `dout` in cros_ec_register() Date: Wed, 8 Jun 2022 11:07:24 +0000 Message-Id: <20220608110734.2928245-14-tzungbi@kernel.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220608110734.2928245-1-tzungbi@kernel.org> References: <20220608110734.2928245-1-tzungbi@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't allocate `din` and `dout` in cros_ec_register() as they will be allocated soon in cros_ec_query_all(). Signed-off-by: Tzung-Bi Shih --- No change from v2. drivers/platform/chrome/cros_ec.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c index e51a3f2176c7..29d3b544dafb 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -188,14 +188,8 @@ int cros_ec_register(struct cros_ec_device *ec_dev) ec_dev->max_passthru = 0; ec_dev->ec = NULL; ec_dev->pd = NULL; - - ec_dev->din = devm_kzalloc(dev, ec_dev->din_size, GFP_KERNEL); - if (!ec_dev->din) - return -ENOMEM; - - ec_dev->dout = devm_kzalloc(dev, ec_dev->dout_size, GFP_KERNEL); - if (!ec_dev->dout) - return -ENOMEM; + ec_dev->din = NULL; + ec_dev->dout = NULL; mutex_init(&ec_dev->lock); -- 2.36.1.255.ge46751e96f-goog