summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2011-02-03 04:42:05 +0100
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-08 04:40:08 +0100
commit84f0e17f78471857104a20dfc57711409f68d7bf (patch)
treef4f1e73f449b7b1d2d63616832e8191bfd2495de /drivers/target
parentBluetooth: fix crash by disabling tasklet in sock accept (diff)
downloadlinux-84f0e17f78471857104a20dfc57711409f68d7bf.tar.xz
linux-84f0e17f78471857104a20dfc57711409f68d7bf.zip
Bluetooth: ath3k: Avoid duplication of code
In commit 86e09287e4f8c81831b4d4118a48597565f0d21b, 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: Rogé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: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'drivers/target')
0 files changed, 0 insertions, 0 deletions