diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-04-01 11:41:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:34 -0400 |
commit | 431ef7a2a486201967304fcc9cfc33e945626fed (patch) | |
tree | 92181215fe9d9d00e949edd1d0ef654d6301f279 /arch/x86/kernel/ds.c | |
parent | 19b4e7f4e9b1c88459cf2c9b9ccaa09cb8bf854d (diff) |
x86: debug Store - call kfree if only we really need it
We should call for kfree if only we really need it.
Though it's safe to call kfree with NULL pointer passed
in this code we've already tested the pointer and can
eliminate the call
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/ds.c')
-rw-r--r-- | arch/x86/kernel/ds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index dcd918c1580d..11c11b8ec48d 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c | |||
@@ -220,11 +220,11 @@ int ds_allocate(void **dsp, size_t bts_size_in_bytes) | |||
220 | 220 | ||
221 | int ds_free(void **dsp) | 221 | int ds_free(void **dsp) |
222 | { | 222 | { |
223 | if (*dsp) | 223 | if (*dsp) { |
224 | kfree((void *)get_bts_buffer_base(*dsp)); | 224 | kfree((void *)get_bts_buffer_base(*dsp)); |
225 | kfree(*dsp); | 225 | kfree(*dsp); |
226 | *dsp = NULL; | 226 | *dsp = NULL; |
227 | 227 | } | |
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
230 | 230 | ||