aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2023-10-18 17:59:47 +0300
committerGreg Kroah-Hartman <[email protected]>2023-10-21 23:04:23 +0200
commit12280cc708f28357e7ad85bab2bcc3715e59a8f7 (patch)
tree46ab5e02c9aa2380b2914c7457925cc1d6ea95e8 /scripts/generate_rust_analyzer.py
parent63ba2d07b4be72b94216d20561f43e1150b25d98 (diff)
parport: Clean up resources correctly when parport_register_port() fails
The smatch warns about uncleaned resources in case the parport_register_port() fails: parport_register_port() warn: '&tmp->full_list' not removed from list This is indeed an issue introduced when converting code to use kasprintf(). However, the whole kasprintf() dance in this case is not needed as dev_set_name() can handle the formatted input and produces the same result. So, the solution is to delegate name forming to the dev_set_name() and make device_register() error path to deal with error handling (via put_device() call). Fixes: 8d8ae17eb0de ("parport: Use kasprintf() instead of fixed buffer formatting") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions