Skip to content
Commit 84f0e17f authored by Rogério Brito's avatar Rogério Brito Committed by Gustavo F. Padovan
Browse files

Bluetooth: ath3k: Avoid duplication of code



In commit 86e09287, to reduce memory
usage, the functions of the ath3k module were rewritten to release the
firmware blob after it has been loaded (successfully or not).

The resuting code has some redundancy and the compiler can potentially
produce better code if we omit a function call that is unconditionally
executed in

,----
|     if (ath3k_load_firmware(udev, firmware)) {
|             release_firmware(firmware);
|             return -EIO;
|     }
|     release_firmware(firmware);
|
|     return 0;
| }
`----

It may also be argued that the rewritten code becomes easier to read,
and also to see the code coverage of the snippet in question.

Signed-off-by: default avatarRogério Brito <rbrito@ime.usp.br>
Cc: Alexander Holler <holler@ahsoftware.de>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent d37f50e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment