From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6020419066F for ; Fri, 9 Aug 2024 09:13:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723194787; cv=none; b=B39wj2BcCV+NYbPc78M64wa2wKirRvAutk7VHaYlbzDCSV/S93qe6xjGX5f/Xe1UeB1ivS1cVZQMO36mb8Y5R9QQNf+U8LnHAAC55fWInnAbm4g6m31x5h4N01xlh5ZQErJUsq3esMu3F5YMTGxSRJ6DPebJX1SgR56rHmI1fLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723194787; c=relaxed/simple; bh=e4DNm1/lJ7U+4PWb6B02i+0u5KN8oACNjU3d7VFKIIQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K2wlsVqS3E82JDUD0qVo7PlWZBJUGU1VBCKPu9tk0XPic6Lq1Rdv3jn5WIKlwUuyT6HSBg5b4LY355OBKlTeqF3uzINH7hyaFCxy2KqhhZA28UQwlPA4gi9NCLSjXqZcRSdaE1ycmYa2LnKd0l6Mnd8xkhWL95d9KNBerLzmMtU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1scLfl-0002QM-Mo; Fri, 09 Aug 2024 11:12:33 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scLfk-005dED-Dg; Fri, 09 Aug 2024 11:12:32 +0200 Received: from sha by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1scLfk-00Al7G-0x; Fri, 09 Aug 2024 11:12:32 +0200 Date: Fri, 9 Aug 2024 11:12:32 +0200 From: Sascha Hauer To: Ping-Ke Shih Cc: Brian Norris , Francesco Dolcini , Kalle Valo , Yogesh Ashok Powar , Bing Zhao , "John W. Linville" , Amitkumar Karwar , Avinash Patil , Kiran Divekar , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel@pengutronix.de" , "stable@vger.kernel.org" Subject: Re: [PATCH] mwifiex: duplicate static structs used in driver instances Message-ID: References: <20240809-mwifiex-duplicate-static-structs-v1-1-6837b903b1a4@pengutronix.de> <4021e822699b44939f6a4731290e2627@realtek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4021e822699b44939f6a4731290e2627@realtek.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Fri, Aug 09, 2024 at 08:49:32AM +0000, Ping-Ke Shih wrote: > Sascha Hauer wrote: > > + wiphy->bands[NL80211_BAND_2GHZ] = devm_kmemdup(adapter->dev, > > + &mwifiex_band_2ghz, > > + sizeof(mwifiex_band_2ghz), > > + GFP_KERNEL); > > It seems like you forget to free the duplicate memory somewhere? It's freed automatically when adapter->dev is released, see the various devm_* functions Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |