Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp958075rwb; Fri, 13 Jan 2023 06:18:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdw+v0qb1rNWsFettX9Jd7xkAn6ta2s3FLrjDFp6MORE+V6jIovbH3Y8ZZsGIQwMp1csXI X-Received: by 2002:adf:ec0e:0:b0:2bb:3219:9bfc with SMTP id x14-20020adfec0e000000b002bb32199bfcmr17080869wrn.50.1673619489291; Fri, 13 Jan 2023 06:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673619489; cv=none; d=google.com; s=arc-20160816; b=KZTJGTy1fzFvTnBhlCto2KPLgVxZe7r8hogR3JGYsLiyNFyJn7ZS8mBQUHiWOYOEmJ 9P1J1KoOerWiAZCb7TtTImxJj6hK/LQVnWOVFM35fyZVSD8AXz3w1DsyXsU4YGDb/HYT 7rqV6zH4fcc8m9dHI23KAiSJEpTRFSqOKIKhv55u/ewuSV64jaA5JA6XPxWn1udNyhjd kZ2kwSyGjoKt+6oAmcldYrMdN3cfHKOzR8EuSv2pTCZsbFs77lsaVRLHq9bNJa9oLWkn dGSx0JrvzfPOqRkE2/u/L75WObf1upm4kh1O5OhrkY4YMR3TxS/hyUOctSxtasyNfPFl 5JMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=xF0ls5Fi+t7xMM14q4HXHz7GOP+iE/4qyk2/iOPLNhE=; b=jxpkpKxM/duxI3+mX28zpqUBr+IB9/BbZRMXhfCA0adyqoopkdBcRDLfB6q6d7gcrV GLUk2PkF5IZJQhW6sAv7kNx8tZ6P0BAzD8jHSWiLgltIX0QJpaLCSXL7QQPkuHDAN3Is EMOwQlaDugHk9XCz2XG6I6JYRr+cE3ECn7+qFSlpudwvVpq4Xy5NKqSn6206JFH2PIgo ytU8ZTb+2anJ/Vtu0UmHiafF60HpXtlCL3Qlf2o0tVw+yVjY7Kovf623VaCdY9FAqkJ/ 2EtfzOSztjJJrFFm1SneCuwQU43zuzxLHZ1KWtlPO60+mOJ/GjMODu7+ugDb+zBhs8E9 52gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lD4nCcmg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay16-20020a5d6f10000000b00288d11a5664si17003422wrb.615.2023.01.13.06.17.49; Fri, 13 Jan 2023 06:18:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lD4nCcmg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241584AbjAMORZ (ORCPT + 65 others); Fri, 13 Jan 2023 09:17:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232417AbjAMOPW (ORCPT ); Fri, 13 Jan 2023 09:15:22 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4907D5E0AB; Fri, 13 Jan 2023 06:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=xF0ls5Fi+t7xMM14q4 HXHz7GOP+iE/4qyk2/iOPLNhE=; b=lD4nCcmgoA1/p/399zKEXQ77X++jXrL1w0 L1PE011hyDddhSAKnz2SPaW4DkVMzYX3hv5Kxdd4a4yZLZVoMPfV75XpMu8Iy5UZ K1g6/SLFGYnId80dXoKGdmn4xp63UPJWZNvMT9JltvXVmwprb3kWs0WrYsVkge9z vYYCSIQbM= Received: from localhost.localdomain (unknown [114.107.204.148]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wCnAMbRZsFjEoX7AA--.30424S4; Fri, 13 Jan 2023 22:13:01 +0800 (CST) From: Lizhe To: kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, johannes.berg@intel.com, alexander@wetzel-home.de Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] wireless/at76c50x-usb.c : Use devm_kmalloc replaces kmalloc Date: Fri, 13 Jan 2023 06:12:31 -0800 Message-Id: <20230113141231.71892-1-sensor1010@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: _____wCnAMbRZsFjEoX7AA--.30424S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrKw1fGF15XF4rWr1fuFyUZFb_yoWfZFc_CF 4xWrn7JFWUJFs2gry7CrW7ZFySkF1xXF4xua13Kay3Xw12vrWUZrWkZF9xZFZrurWfAFy3 Ar1DtFy5ZayvgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRWE_NPUUUUU== X-Originating-IP: [114.107.204.148] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiKA-1q17WLz+AlgAAs3 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-wireless@vger.kernel.org use devm_kmalloc replaces kmalloc Signed-off-by: Lizhe --- drivers/net/wireless/atmel/at76c50x-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index 009bca34ece3..f486ddb83d46 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -2444,7 +2444,7 @@ static int at76_probe(struct usb_interface *interface, udev = usb_get_dev(interface_to_usbdev(interface)); - fwv = kmalloc(sizeof(*fwv), GFP_KERNEL); + fwv = devm_kmalloc(sizeof(*fwv), GFP_KERNEL); if (!fwv) { ret = -ENOMEM; goto exit; @@ -2535,7 +2535,6 @@ static int at76_probe(struct usb_interface *interface, at76_delete_device(priv); exit: - kfree(fwv); if (ret < 0) usb_put_dev(udev); return ret; -- 2.17.1