All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
@ 2020-12-29 10:50 Xiaolei Wang
  2020-12-29 14:32 ` Mark Brown
       [not found] ` <d516efdd-7e66-13fe-3798-cdea5ff012dc@web.de>
  0 siblings, 2 replies; 11+ messages in thread
From: Xiaolei Wang @ 2020-12-29 10:50 UTC (permalink / raw)
  To: broonie; +Cc: gregkh, rafael, david, linux-kernel

After initializing the regmap through
syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the
device, because the debugfs_name has been allocated, there is no
need to redistribute it again

unreferenced object 0xd8399b80 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937641 (age 278.590s)
  hex dump (first 32 bytes):
	64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72
dummy-iomuxc-gpr
	40 32 30 65 34 30 30 30 00 7f 52 5b d8 7e 42 69
@20e4000..R[.~Bi
  backtrace:
    [<ca384d6f>] kasprintf+0x2c/0x54
    [<6ad3bbc2>] regmap_debugfs_init+0xdc/0x2fc
    [<bc4181da>] __regmap_init+0xc38/0xd88
    [<1f7e0609>] of_syscon_register+0x168/0x294
    [<735e8766>] device_node_get_regmap+0x6c/0x98
    [<d96c8982>] imx6ul_init_machine+0x20/0x88
    [<0456565b>] customize_machine+0x1c/0x30
    [<d07393d8>] do_one_initcall+0x80/0x3ac
    [<7e584867>] kernel_init_freeable+0x170/0x1f0
    [<80074741>] kernel_init+0x8/0x120
    [<285d6f28>] ret_from_fork+0x14/0x20
    [<00000000>] 0x0

Fixes: 9b947a13e7f6 ("regmap: use debugfs even when no device")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
---
 drivers/base/regmap/regmap-debugfs.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 8dfac7f3ed7a..bf03cd343be2 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -582,18 +582,25 @@ void regmap_debugfs_init(struct regmap *map)
 		devname = dev_name(map->dev);
 
 	if (name) {
-		map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
+		if (!map->debugfs_name) {
+			map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
 					      devname, name);
+			if (!map->debugfs_name)
+				return;
+		}
 		name = map->debugfs_name;
 	} else {
 		name = devname;
 	}
 
 	if (!strcmp(name, "dummy")) {
-		kfree(map->debugfs_name);
+		if (!map->debugfs_name)
+			kfree(map->debugfs_name);
 
 		map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
 						dummy_index);
+		if (!map->debugfs_name)
+				return;
 		name = map->debugfs_name;
 		dummy_index++;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
  2020-12-29 10:50 [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Xiaolei Wang
@ 2020-12-29 14:32 ` Mark Brown
       [not found] ` <d516efdd-7e66-13fe-3798-cdea5ff012dc@web.de>
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-12-29 14:32 UTC (permalink / raw)
  To: Xiaolei Wang; +Cc: linux-kernel, david, gregkh, rafael

On Tue, 29 Dec 2020 18:50:46 +0800, Xiaolei Wang wrote:
> After initializing the regmap through
> syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the
> device, because the debugfs_name has been allocated, there is no
> need to redistribute it again
> 
> unreferenced object 0xd8399b80 (size 64):
>   comm "swapper/0", pid 1, jiffies 4294937641 (age 278.590s)
>   hex dump (first 32 bytes):
> 	64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72
> dummy-iomuxc-gpr
> 	40 32 30 65 34 30 30 30 00 7f 52 5b d8 7e 42 69
> @20e4000..R[.~Bi
>   backtrace:
>     [<ca384d6f>] kasprintf+0x2c/0x54
>     [<6ad3bbc2>] regmap_debugfs_init+0xdc/0x2fc
>     [<bc4181da>] __regmap_init+0xc38/0xd88
>     [<1f7e0609>] of_syscon_register+0x168/0x294
>     [<735e8766>] device_node_get_regmap+0x6c/0x98
>     [<d96c8982>] imx6ul_init_machine+0x20/0x88
>     [<0456565b>] customize_machine+0x1c/0x30
>     [<d07393d8>] do_one_initcall+0x80/0x3ac
>     [<7e584867>] kernel_init_freeable+0x170/0x1f0
>     [<80074741>] kernel_init+0x8/0x120
>     [<285d6f28>] ret_from_fork+0x14/0x20
>     [<00000000>] 0x0

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/1] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
      commit: cffa4b2122f5f3e53cf3d529bbc74651f95856d5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
       [not found] ` <d516efdd-7e66-13fe-3798-cdea5ff012dc@web.de>
@ 2020-12-30 10:14     ` Wang, Xiaolei
  0 siblings, 0 replies; 11+ messages in thread
From: Wang, Xiaolei @ 2020-12-30 10:14 UTC (permalink / raw)
  To: Markus Elfring, kernel-janitors
  Cc: linux-kernel, David Lechner, Greg Kroah-Hartman, Mark Brown,
	Rafael J. Wysocki, Julia Lawall

Hi Markus

Thank you very much, very good suggestion, do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

Thanks 
Xiaolei

…
> +++ b/drivers/base/regmap/regmap-debugfs.c
> @@ -582,18 +582,25 @@ void regmap_debugfs_init(struct regmap *map)
> +			map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
>  					      devname, name);

> I suggest to reconsider the alignment for function call parameters for this patch.
> +		if (!map->debugfs_name)
> +			kfree(map->debugfs_name);

> Such a null pointer check is redundant.

> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=139711f033f636cc78b6aaf7363252241b9698ef#n2




-----Original Message-----
From: Markus Elfring <Markus.Elfring@web.de> 
Sent: Wednesday, December 30, 2020 5:49 PM
To: Wang, Xiaolei <Xiaolei.Wang@windriver.com>; kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org; David Lechner <david@lechnology.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Mark Brown <broonie@kernel.org>; Rafael J. Wysocki <rafael@kernel.org>; Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

…
> +++ b/drivers/base/regmap/regmap-debugfs.c
> @@ -582,18 +582,25 @@ void regmap_debugfs_init(struct regmap *map)
> +			map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
>  					      devname, name);

I suggest to reconsider the alignment for function call parameters for this patch.


…
> +		if (!map->debugfs_name)
> +			kfree(map->debugfs_name);

Such a null pointer check is redundant.

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=139711f033f636cc78b6aaf7363252241b9698ef#n2

Regards,
Markus

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
@ 2020-12-30 10:14     ` Wang, Xiaolei
  0 siblings, 0 replies; 11+ messages in thread
From: Wang, Xiaolei @ 2020-12-30 10:14 UTC (permalink / raw)
  To: Markus Elfring, kernel-janitors
  Cc: linux-kernel, David Lech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c3QgdG8gcmVj
b25zaWRlciB0aGUgYWxpZ25tZW50IGZvciBmdW5jdGlvbiBjYWxsIHBhcmFtZXRlcnMgZm9yIHRo
aXMgcGF0Y2guDQoNCg0K4oCmDQo+ICsJCWlmICghbWFwLT5kZWJ1Z2ZzX25hbWUpDQo+ICsJCQlr
ZnJlZShtYXAtPmRlYnVnZnNfbmFtZSk7DQoNClN1Y2ggYSBudWxsIHBvaW50ZXIgY2hlY2sgaXMg
cmVkdW5kYW50Lg0KDQpTZWUgYWxzbzoNCmh0dHBzOi8vZ2l0Lmtlcm5lbC5vcmcvcHViL3NjbS9s
aW51eC9rZXJuZWwvZ2l0L3RvcnZhbGRzL2xpbnV4LmdpdC90cmVlL3NjcmlwdHMvY29jY2luZWxs
ZS9mcmVlL2lmbnVsbGZyZWUuY29jY2k/aWQ9MTM5NzExZjAzM2Y2MzZjYzc4YjZhYWY3MzYzMjUy
MjQxYjk2OThlZiNuMg0KDQpSZWdhcmRzLA0KTWFya3VzDQo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
       [not found]     ` <d463ff8b-306d-6f40-9115-1595d69edc95@web.de>
@ 2020-12-30 12:37         ` Wang, Xiaolei
  0 siblings, 0 replies; 11+ messages in thread
From: Wang, Xiaolei @ 2020-12-30 12:37 UTC (permalink / raw)
  To: Markus Elfring, kernel-janitors
  Cc: linux-kernel, David Lechner, Greg Kroah-Hartman, Mark Brown,
	Rafael J. Wysocki, Julia Lawall

Hi Markus

> Thank you very much, very good suggestion,

> Thanks for another positive feedback.


> do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

> Please convince the involved contributors to integrate a corrected patch version.

Do you mean that I should correct the original patch and explain my changes and send it out?

> * Better indentation.

* …
>> +		if (!map->debugfs_name)
>> +			kfree(map->debugfs_name);

>  Would this questionable null pointer check result in a memory leak?

if (!map->debugfs_name)
	kfree(map->debugfs_name);

This null pointer check is not in the memory leak

Thanks
xiaolei
-----Original Message-----
From: Markus Elfring <Markus.Elfring@web.de> 
Sent: Wednesday, December 30, 2020 8:02 PM
To: Wang, Xiaolei <Xiaolei.Wang@windriver.com>; kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org; David Lechner <david@lechnology.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Mark Brown <broonie@kernel.org>; Rafael J. Wysocki <rafael@kernel.org>; Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

> Thank you very much, very good suggestion,

Thanks for another positive feedback.


> do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

Please convince the involved contributors to integrate a corrected patch version.

* Better indentation.

* …
>> +		if (!map->debugfs_name)
>> +			kfree(map->debugfs_name);

  Would this questionable null pointer check result in a memory leak?

Regards,
Markus

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
@ 2020-12-30 12:37         ` Wang, Xiaolei
  0 siblings, 0 replies; 11+ messages in thread
From: Wang, Xiaolei @ 2020-12-30 12:37 UTC (permalink / raw)
  To: Markus Elfring, kernel-janitors
  Cc: linux-kernel, David Lechner, Greg Kroah-Hartman, Mark Brown,
	Rafael J. Wysocki, Julia Lawall

SGkgTWFya3VzDQoNCj4gVGhhbmsgeW91IHZlcnkgbXVjaCwgdmVyeSBnb29kIHN1Z2dlc3Rpb24s
DQoNCj4gVGhhbmtzIGZvciBhbm90aGVyIHBvc2l0aXZlIGZlZWRiYWNrLg0KDQoNCj4gZG8gSSBu
ZWVkIHRvIHJlLXNlbmQgYSBwYXRjaCB0byBmaXggdGhpcyBwcm9ibGVtLCBvciBtb2RpZnkgdGhl
IHByZXZpb3VzIHBhdGNoIGFuZCBzZW5kIGl0IGFnYWluPw0KDQo+IFBsZWFzZSBjb252aW5jZSB0
aGUgaW52b2x2ZWQgY29udHJpYnV0b3JzIHRvIGludGVncm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5vcmc+OyBSYWZhZWwgSi4gV3lzb2NraSA8cmFmYWVsQGtlcm5lbC5vcmc+
OyBKdWxpYSBMYXdhbGwgPGp1bGlhLmxhd2FsbEBsaXA2LmZyPg0KU3ViamVjdDogUmU6IFtQQVRD
SCB2M10gcmVnbWFwOiBkZWJ1Z2ZzOiBGaXggYSBtZW1vcnkgbGVhayB3aGVuIGNhbGxpbmcgcmVn
bWFwX2F0dGFjaF9kZXYNCg0KPiBUaGFuayB5b3UgdmVyeSBtdWNoLCB2ZXJ5IGdvb2Qgc3VnZ2Vz
dGlvbiwNCg0KVGhhbmtzIGZvciBhbm90aGVyIHBvc2l0aXZlIGZlZWRiYWNrLg0KDQoNCj4gZG8g
SSBuZWVkIHRvIHJlLXNlbmQgYSBwYXRjaCB0byBmaXggdGhpcyBwcm9ibGVtLCBvciBtb2RpZnkg
dGhlIHByZXZpb3VzIHBhdGNoIGFuZCBzZW5kIGl0IGFnYWluPw0KDQpQbGVhc2UgY29udmluY2Ug
dGhlIGludm9sdmVkIGNvbnRyaWJ1dG9ycyB0byBpbnRlZ3JhdGUgYSBjb3JyZWN0ZWQgcGF0Y2gg
dmVyc2lvbi4NCg0KKiBCZXR0ZXIgaW5kZW50YXRpb24uDQoNCiog4oCmDQo+PiArCQlpZiAoIW1h
cC0+ZGVidWdmc19uYW1lKQ0KPj4gKwkJCWtmcmVlKG1hcC0+ZGVidWdmc19uYW1lKTsNCg0KICBX
b3VsZCB0aGlzIHF1ZXN0aW9uYWJsZSBudWxsIHBvaW50ZXIgY2hlY2sgcmVzdWx0IGluIGEgbWVt
b3J5IGxlYWs/DQoNClJlZ2FyZHMsDQpNYXJrdXMNCg=

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
       [not found]     ` <1503f5fa-1ad6-7675-6e02-6dc1eb04c1de@web.de>
@ 2020-12-30 12:50         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2020-12-30 12:50 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Xiaolei Wang, kernel-janitors, linux-kernel, David Lechner,
	Mark Brown, Rafael J. Wysocki, Julia Lawall

On Wed, Dec 30, 2020 at 01:01:42PM +0100, Markus Elfring wrote:
> > Thank you very much, very good suggestion,
> 
> Thanks for another positive feedback.
> 
> 
> > do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?
> 
> Please convince the involved contributors to integrate a corrected patch version.
> 
> * Better indentation.
> 
> * …
> >> +		if (!map->debugfs_name)
> >> +			kfree(map->debugfs_name);
> 
>   Would this questionable null pointer check result in a memory leak?

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
@ 2020-12-30 12:50         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2020-12-30 12:50 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Xiaolei Wang, kernel-janitors, linux-kernel, David Lechner,
	Mark Brown, Rafael J. Wysocki, Julia Lawall

On Wed, Dec 30, 2020 at 01:01:42PM +0100, Markus Elfring wrote:
> > Thank you very much, very good suggestion,
> 
> Thanks for another positive feedback.
> 
> 
> > do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?
> 
> Please convince the involved contributors to integrate a corrected patch version.
> 
> * Better indentation.
> 
> * …
> >> +		if (!map->debugfs_name)
> >> +			kfree(map->debugfs_name);
> 
>   Would this questionable null pointer check result in a memory leak?

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
  2020-12-30 10:14     ` Wang, Xiaolei
                       ` (2 preceding siblings ...)
  (?)
@ 2020-12-30 13:39     ` Mark Brown
  -1 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-12-30 13:39 UTC (permalink / raw)
  To: Wang, Xiaolei
  Cc: Markus Elfring, kernel-janitors, linux-kernel, David Lechner,
	Greg Kroah-Hartman, Rafael J. Wysocki, Julia Lawall

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

On Wed, Dec 30, 2020 at 10:14:22AM +0000, Wang, Xiaolei wrote:
> Hi Markus
> 
> Thank you very much, very good suggestion, do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

Please feel free to ignore Markus.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] regmap: debugfs: Delete a misplaced pointer check in regmap_debugfs_init()
       [not found]           ` <81f33869-32f6-650f-0f06-e2a5dce57236@web.de>
@ 2021-01-04 14:17               ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2021-01-04 14:17 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Xiaolei Wang, Rafael J. Wysocki, Mark Brown, kernel-janitors,
	LKML, Dan Carpenter, David Lechner, Julia Lawall, Zheng Yongjun

On Mon, Jan 04, 2021 at 03:12:33PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 4 Jan 2021 13:43:01 +0100

This does not belong in a changelog body of a patch :(


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] regmap: debugfs: Delete a misplaced pointer check in regmap_debugfs_init()
@ 2021-01-04 14:17               ` Greg Kroah-Hartman
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2021-01-04 14:17 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Xiaolei Wang, Rafael J. Wysocki, Mark Brown, kernel-janitors,
	LKML, Dan Carpenter, David Lechner, Julia Lawall, Zheng Yongjun

On Mon, Jan 04, 2021 at 03:12:33PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 4 Jan 2021 13:43:01 +0100

This does not belong in a changelog body of a patch :(

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-04 14:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 10:50 [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Xiaolei Wang
2020-12-29 14:32 ` Mark Brown
     [not found] ` <d516efdd-7e66-13fe-3798-cdea5ff012dc@web.de>
2020-12-30 10:14   ` Wang, Xiaolei
2020-12-30 10:14     ` Wang, Xiaolei
     [not found]     ` <d463ff8b-306d-6f40-9115-1595d69edc95@web.de>
2020-12-30 12:37       ` Wang, Xiaolei
2020-12-30 12:37         ` Wang, Xiaolei
     [not found]         ` <932c5921-9ad3-e37b-5f31-4de69fa0ca8b@web.de>
     [not found]           ` <81f33869-32f6-650f-0f06-e2a5dce57236@web.de>
2021-01-04 14:17             ` [PATCH 1/2] regmap: debugfs: Delete a misplaced pointer check in regmap_debugfs_init() Greg Kroah-Hartman
2021-01-04 14:17               ` Greg Kroah-Hartman
     [not found]     ` <1503f5fa-1ad6-7675-6e02-6dc1eb04c1de@web.de>
2020-12-30 12:50       ` [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Greg Kroah-Hartman
2020-12-30 12:50         ` Greg Kroah-Hartman
2020-12-30 13:39     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.