aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic/docproc.c
diff options
context:
space:
mode:
authorJun'ichi Nomura <[email protected]>2006-10-30 21:23:56 +0000
committerLinus Torvalds <[email protected]>2006-10-31 03:29:41 +0000
commitdf6c0cd9a872ebf2298f5d66d8c789f62dbe35fc (patch)
treec2d9ecf8ebb71f27aef1b5cc9dd94453e3d18150 /scripts/basic/docproc.c
parent[PATCH] fix bd_claim_by_kobject error handling (diff)
downloadkernel-df6c0cd9a872ebf2298f5d66d8c789f62dbe35fc.tar.gz
kernel-df6c0cd9a872ebf2298f5d66d8c789f62dbe35fc.zip
[PATCH] clean up add_bd_holder()
add_bd_holder() is called from bd_claim_by_kobject to put a given struct bd_holder in the list if there is no matching entry. There are 3 possible results of add_bd_holder(): 1. there is no matching entry and add the given one to the list 2. there is matching entry, so just increment reference count of the existing one 3. something failed during its course 1 and 2 are successful cases. But for case 2, someone has to free the unused struct bd_holder. The current code frees it inside of add_bd_holder and returns same value 0 for both cases 1 and 2. However, it's natural and less error-prone if caller frees it since it's allocated by the caller. Signed-off-by: Jun'ichi Nomura <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/basic/docproc.c')
0 files changed, 0 insertions, 0 deletions