diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-01-05 14:42:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-17 14:05:38 +0100 |
commit | 6f484096196bb1f3c51b88a5acff3474e2c6a3b0 (patch) | |
tree | f39f18305e9ca8a570af1aebf246f90a739b225a /scripts/tracing | |
parent | bbb2fee395e902f3e5495b710d0a6a7e86a0d5c0 (diff) |
regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init()
commit f6bcb4c7f366905b66ce8ffca7190118244bb642 upstream.
This code will leak "map->debugfs_name" because the if statement is
reversed so it only frees NULL pointers instead of non-NULL. In
fact the if statement is not required and should just be removed
because kfree() accepts NULL pointers.
Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/tracing')
0 files changed, 0 insertions, 0 deletions