Commit 2004f45e authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Use kernel alloc/free

Abstractions are frowned upon.

cocci script:
virtual context
virtual patch
virtual org
virtual report

@@
expression ptr;
@@

- dm_alloc(ptr)
+ kzalloc(ptr, GFP_KERNEL)

@@
expression ptr, size;
@@

- dm_realloc(ptr, size)
+ krealloc(ptr, size, GFP_KERNEL)

@@
expression ptr;
@@

- dm_free(ptr)
+ kfree(ptr)

v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 82b400a6
......@@ -2429,7 +2429,7 @@ dm_crtc_duplicate_state(struct drm_crtc *crtc)
if (WARN_ON(!crtc->state))
return NULL;
state = dm_alloc(sizeof(*state));
state = kzalloc(sizeof(*state), GFP_KERNEL);
__drm_atomic_helper_crtc_duplicate_state(crtc, &state->base);
......
......@@ -70,8 +70,8 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger,
{
/* malloc buffer and init offsets */
logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE;
logger->log_buffer = (char *)dm_alloc(logger->log_buffer_size *
sizeof(char));
logger->log_buffer = (char *)kzalloc(logger->log_buffer_size * sizeof(char),
GFP_KERNEL);
if (!logger->log_buffer)
return false;
......@@ -97,7 +97,7 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger,
static void destruct(struct dal_logger *logger)
{
if (logger->log_buffer) {
dm_free(logger->log_buffer);
kfree(logger->log_buffer);
logger->log_buffer = NULL;
}
}
......@@ -105,12 +105,13 @@ static void destruct(struct dal_logger *logger)
struct dal_logger *dal_logger_create(struct dc_context *ctx, uint32_t log_mask)
{
/* malloc struct */
struct dal_logger *logger = dm_alloc(sizeof(struct dal_logger));
struct dal_logger *logger = kzalloc(sizeof(struct dal_logger),
GFP_KERNEL);
if (!logger)
return NULL;
if (!construct(ctx, logger, log_mask)) {
dm_free(logger);
kfree(logger);
return NULL;
}
......@@ -122,7 +123,7 @@ uint32_t dal_logger_destroy(struct dal_logger **logger)
if (logger == NULL || *logger == NULL)
return 1;
destruct(*logger);
dm_free(*logger);
kfree(*logger);
*logger = NULL;
return 0;
......@@ -390,7 +391,8 @@ void dm_logger_open(
entry->type = log_type;
entry->logger = logger;
entry->buf = dm_alloc(DAL_LOGGER_BUFFER_MAX_SIZE * sizeof(char));
entry->buf = kzalloc(DAL_LOGGER_BUFFER_MAX_SIZE * sizeof(char),
GFP_KERNEL);
entry->buf_offset = 0;
entry->max_buf_bytes = DAL_LOGGER_BUFFER_MAX_SIZE * sizeof(char);
......@@ -421,7 +423,7 @@ void dm_logger_close(struct log_entry *entry)
cleanup:
if (entry->buf) {
dm_free(entry->buf);
kfree(entry->buf);
entry->buf = NULL;
entry->buf_offset = 0;
entry->max_buf_bytes = 0;
......
......@@ -40,7 +40,7 @@ bool dal_vector_construct(
return false;
}
vector->container = dm_alloc(struct_size * capacity);
vector->container = kzalloc(struct_size * capacity, GFP_KERNEL);
if (vector->container == NULL)
return false;
vector->capacity = capacity;
......@@ -67,7 +67,7 @@ bool dal_vector_presized_costruct(
return false;
}
vector->container = dm_alloc(struct_size * count);
vector->container = kzalloc(struct_size * count, GFP_KERNEL);
if (vector->container == NULL)
return false;
......@@ -95,7 +95,7 @@ struct vector *dal_vector_presized_create(
void *initial_value,
uint32_t struct_size)
{
struct vector *vector = dm_alloc(sizeof(struct vector));
struct vector *vector = kzalloc(sizeof(struct vector), GFP_KERNEL);
if (vector == NULL)
return NULL;
......@@ -105,7 +105,7 @@ struct vector *dal_vector_presized_create(
return vector;
BREAK_TO_DEBUGGER();
dm_free(vector);
kfree(vector);
return NULL;
}
......@@ -114,7 +114,7 @@ struct vector *dal_vector_create(
uint32_t capacity,
uint32_t struct_size)
{
struct vector *vector = dm_alloc(sizeof(struct vector));
struct vector *vector = kzalloc(sizeof(struct vector), GFP_KERNEL);
if (vector == NULL)
return NULL;
......@@ -123,7 +123,7 @@ struct vector *dal_vector_create(
return vector;
BREAK_TO_DEBUGGER();
dm_free(vector);
kfree(vector);
return NULL;
}
......@@ -131,7 +131,7 @@ void dal_vector_destruct(
struct vector *vector)
{
if (vector->container != NULL)
dm_free(vector->container);
kfree(vector->container);
vector->count = 0;
vector->capacity = 0;
}
......@@ -142,7 +142,7 @@ void dal_vector_destroy(
if (vector == NULL || *vector == NULL)
return;
dal_vector_destruct(*vector);
dm_free(*vector);
kfree(*vector);
*vector = NULL;
}
......@@ -290,7 +290,8 @@ bool dal_vector_reserve(struct vector *vector, uint32_t capacity)
if (capacity <= vector->capacity)
return true;
new_container = dm_realloc(vector->container, capacity * vector->struct_size);
new_container = krealloc(vector->container,
capacity * vector->struct_size, GFP_KERNEL);
if (new_container) {
vector->container = new_container;
......
......@@ -116,14 +116,14 @@ struct dc_bios *bios_parser_create(
{
struct bios_parser *bp = NULL;
bp = dm_alloc(sizeof(struct bios_parser));
bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
if (!bp)
return NULL;
if (bios_parser_construct(bp, init, dce_version))
return &bp->base;
dm_free(bp);
kfree(bp);
BREAK_TO_DEBUGGER();
return NULL;
}
......@@ -131,10 +131,10 @@ struct dc_bios *bios_parser_create(
static void destruct(struct bios_parser *bp)
{
if (bp->base.bios_local_image)
dm_free(bp->base.bios_local_image);
kfree(bp->base.bios_local_image);
if (bp->base.integrated_info)
dm_free(bp->base.integrated_info);
kfree(bp->base.integrated_info);
}
static void bios_parser_destroy(struct dc_bios **dcb)
......@@ -148,7 +148,7 @@ static void bios_parser_destroy(struct dc_bios **dcb)
destruct(bp);
dm_free(bp);
kfree(bp);
*dcb = NULL;
}
......@@ -3531,7 +3531,8 @@ static void process_ext_display_connection_info(struct bios_parser *bp)
uint8_t *original_bios;
/* Step 1: Replace bios image with the new copy which will be
* patched */
bp->base.bios_local_image = dm_alloc(bp->base.bios_size);
bp->base.bios_local_image = kzalloc(bp->base.bios_size,
GFP_KERNEL);
if (bp->base.bios_local_image == NULL) {
BREAK_TO_DEBUGGER();
/* Failed to alloc bp->base.bios_local_image */
......@@ -3965,7 +3966,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
struct bios_parser *bp = BP_FROM_DCB(dcb);
struct integrated_info *info = NULL;
info = dm_alloc(sizeof(struct integrated_info));
info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
if (info == NULL) {
ASSERT_CRITICAL(0);
......@@ -3975,7 +3976,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
if (construct_integrated_info(bp, info) == BP_RESULT_OK)
return info;
dm_free(info);
kfree(info);
return NULL;
}
......
......@@ -107,10 +107,10 @@ static struct atom_encoder_caps_record *get_encoder_cap_record(
static void destruct(struct bios_parser *bp)
{
if (bp->base.bios_local_image)
dm_free(bp->base.bios_local_image);
kfree(bp->base.bios_local_image);
if (bp->base.integrated_info)
dm_free(bp->base.integrated_info);
kfree(bp->base.integrated_info);
}
static void firmware_parser_destroy(struct dc_bios **dcb)
......@@ -124,7 +124,7 @@ static void firmware_parser_destroy(struct dc_bios **dcb)
destruct(bp);
dm_free(bp);
kfree(bp);
*dcb = NULL;
}
......@@ -2030,7 +2030,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
struct bios_parser *bp = BP_FROM_DCB(dcb);
struct integrated_info *info = NULL;
info = dm_alloc(sizeof(struct integrated_info));
info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
if (info == NULL) {
ASSERT_CRITICAL(0);
......@@ -2040,7 +2040,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
if (construct_integrated_info(bp, info) == BP_RESULT_OK)
return info;
dm_free(info);
kfree(info);
return NULL;
}
......@@ -2205,14 +2205,14 @@ struct dc_bios *firmware_parser_create(
{
struct bios_parser *bp = NULL;
bp = dm_alloc(sizeof(struct bios_parser));
bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
if (!bp)
return NULL;
if (bios_parser_construct(bp, init, dce_version))
return &bp->base;
dm_free(bp);
kfree(bp);
return NULL;
}
......
......@@ -2792,7 +2792,8 @@ bool bw_calcs(struct dc_context *ctx,
int pipe_count,
struct dce_bw_output *calcs_output)
{
struct bw_calcs_data *data = dm_alloc(sizeof(struct bw_calcs_data));
struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data),
GFP_KERNEL);
populate_initial_data(pipe, pipe_count, data);
......@@ -3248,7 +3249,7 @@ bool bw_calcs(struct dc_context *ctx,
calcs_output->sclk_khz = 0;
}
dm_free(data);
kfree(data);
return is_display_configuration_supported(vbios, calcs_output);
}
......@@ -481,8 +481,8 @@ static void dcn_dml_wm_override(
{
int i, in_idx, active_count;
struct _vcs_dpi_display_e2e_pipe_params_st *input = dm_alloc(pool->pipe_count *
sizeof(struct _vcs_dpi_display_e2e_pipe_params_st));
struct _vcs_dpi_display_e2e_pipe_params_st *input = kzalloc(pool->pipe_count * sizeof(struct _vcs_dpi_display_e2e_pipe_params_st),
GFP_KERNEL);
struct wm {
double urgent;
struct _vcs_dpi_cstate_pstate_watermarks_st cpstate;
......@@ -560,7 +560,7 @@ static void dcn_dml_wm_override(
pipe->plane_state->flip_immediate);
in_idx++;
}
dm_free(input);
kfree(input);
}
static void split_stream_across_pipes(
......
......@@ -113,7 +113,7 @@ static bool create_links(
}
for (i = 0; i < num_virtual_links; i++) {
struct dc_link *link = dm_alloc(sizeof(*link));
struct dc_link *link = kzalloc(sizeof(*link), GFP_KERNEL);
struct encoder_init_data enc_init = {0};
if (link == NULL) {
......@@ -127,7 +127,7 @@ static bool create_links(
link->link_id.type = OBJECT_TYPE_CONNECTOR;
link->link_id.id = CONNECTOR_ID_VIRTUAL;
link->link_id.enum_id = ENUM_ID_1;
link->link_enc = dm_alloc(sizeof(*link->link_enc));
link->link_enc = kzalloc(sizeof(*link->link_enc), GFP_KERNEL);
enc_init.ctx = dc->ctx;
enc_init.channel = CHANNEL_ID_UNKNOWN;
......@@ -413,20 +413,20 @@ static void destruct(struct dc *dc)
if (dc->ctx->logger)
dal_logger_destroy(&dc->ctx->logger);
dm_free(dc->ctx);
kfree(dc->ctx);
dc->ctx = NULL;
dm_free(dc->bw_vbios);
kfree(dc->bw_vbios);
dc->bw_vbios = NULL;
dm_free(dc->bw_dceip);
kfree(dc->bw_dceip);
dc->bw_dceip = NULL;
#ifdef CONFIG_DRM_AMD_DC_DCN1_0
dm_free(dc->dcn_soc);
kfree(dc->dcn_soc);
dc->dcn_soc = NULL;
dm_free(dc->dcn_ip);
kfree(dc->dcn_ip);
dc->dcn_ip = NULL;
#endif
......@@ -436,12 +436,15 @@ static bool construct(struct dc *dc,
const struct dc_init_data *init_params)
{
struct dal_logger *logger;
struct dc_context *dc_ctx = dm_alloc(sizeof(*dc_ctx));
struct bw_calcs_dceip *dc_dceip = dm_alloc(sizeof(*dc_dceip));
struct bw_calcs_vbios *dc_vbios = dm_alloc(sizeof(*dc_vbios));
struct dc_context *dc_ctx = kzalloc(sizeof(*dc_ctx), GFP_KERNEL);
struct bw_calcs_dceip *dc_dceip = kzalloc(sizeof(*dc_dceip),
GFP_KERNEL);
struct bw_calcs_vbios *dc_vbios = kzalloc(sizeof(*dc_vbios),
GFP_KERNEL);
#ifdef CONFIG_DRM_AMD_DC_DCN1_0
struct dcn_soc_bounding_box *dcn_soc = dm_alloc(sizeof(*dcn_soc));
struct dcn_ip_params *dcn_ip = dm_alloc(sizeof(*dcn_ip));
struct dcn_soc_bounding_box *dcn_soc = kzalloc(sizeof(*dcn_soc),
GFP_KERNEL);
struct dcn_ip_params *dcn_ip = kzalloc(sizeof(*dcn_ip), GFP_KERNEL);
#endif
enum dce_version dc_version = DCE_VERSION_UNKNOWN;
......@@ -604,7 +607,7 @@ void ProgramPixelDurationV(unsigned int pixelClockInKHz )
struct dc *dc_create(const struct dc_init_data *init_params)
{
struct dc *dc = dm_alloc(sizeof(*dc));
struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
unsigned int full_pipe_count;
if (NULL == dc)
......@@ -638,7 +641,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
return dc;
construct_fail:
dm_free(dc);
kfree(dc);
alloc_fail:
return NULL;
......@@ -647,7 +650,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
void dc_destroy(struct dc **dc)
{
destruct(*dc);
dm_free(*dc);
kfree(*dc);
*dc = NULL;
}
......@@ -900,7 +903,7 @@ bool dc_commit_planes_to_stream(
struct dc_scaling_info scaling_info[MAX_SURFACES];
int i;
struct dc_stream_update *stream_update =
dm_alloc(sizeof(struct dc_stream_update));
kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);
if (!stream_update) {
BREAK_TO_DEBUGGER();
......@@ -951,13 +954,14 @@ bool dc_commit_planes_to_stream(
dc_post_update_surfaces_to_stream(dc);
dm_free(stream_update);
kfree(stream_update);
return true;
}
struct dc_state *dc_create_state(void)
{
struct dc_state *context = dm_alloc(sizeof(struct dc_state));
struct dc_state *context = kzalloc(sizeof(struct dc_state),
GFP_KERNEL);
if (!context)
return NULL;
......@@ -979,7 +983,7 @@ void dc_release_state(struct dc_state *context)
if (atomic_read(&context->ref_count) == 0) {
dc_resource_state_destruct(context);
dm_free(context);
kfree(context);
}
}
......
......@@ -1100,7 +1100,7 @@ static bool construct(
struct dc_link *link_create(const struct link_init_data *init_params)
{
struct dc_link *link =
dm_alloc(sizeof(*link));
kzalloc(sizeof(*link), GFP_KERNEL);
if (NULL == link)
goto alloc_fail;
......@@ -1111,7 +1111,7 @@ struct dc_link *link_create(const struct link_init_data *init_params)
return link;
construct_fail:
dm_free(link);
kfree(link);
alloc_fail:
return NULL;
......@@ -1120,7 +1120,7 @@ struct dc_link *link_create(const struct link_init_data *init_params)
void link_destroy(struct dc_link **link)
{
destruct(*link);
dm_free(*link);
kfree(*link);
*link = NULL;
}
......
......@@ -130,7 +130,7 @@ struct i2c_payloads *dal_ddc_i2c_payloads_create(struct dc_context *ctx, uint32_
{
struct i2c_payloads *payloads;
payloads = dm_alloc(sizeof(struct i2c_payloads));
payloads = kzalloc(sizeof(struct i2c_payloads), GFP_KERNEL);
if (!payloads)
return NULL;
......@@ -139,7 +139,7 @@ struct i2c_payloads *dal_ddc_i2c_payloads_create(struct dc_context *ctx, uint32_
&payloads->payloads, ctx, count, sizeof(struct i2c_payload)))
return payloads;
dm_free(payloads);
kfree(payloads);
return NULL;
}
......@@ -159,7 +159,7 @@ void dal_ddc_i2c_payloads_destroy(struct i2c_payloads **p)
if (!p || !*p)
return;
dal_vector_destruct(&(*p)->payloads);
dm_free(*p);
kfree(*p);
*p = NULL;
}
......@@ -168,7 +168,7 @@ struct aux_payloads *dal_ddc_aux_payloads_create(struct dc_context *ctx, uint32_
{
struct aux_payloads *payloads;
payloads = dm_alloc(sizeof(struct aux_payloads));
payloads = kzalloc(sizeof(struct aux_payloads), GFP_KERNEL);
if (!payloads)
return NULL;
......@@ -177,7 +177,7 @@ struct aux_payloads *dal_ddc_aux_payloads_create(struct dc_context *ctx, uint32_
&payloads->payloads, ctx, count, sizeof(struct aux_payload)))
return payloads;
dm_free(payloads);
kfree(payloads);
return NULL;
}
......@@ -197,7 +197,7 @@ void dal_ddc_aux_payloads_destroy(struct aux_payloads **p)
return;
dal_vector_destruct(&(*p)->payloads);
dm_free(*p);
kfree(*p);
*p = NULL;
}
......@@ -290,7 +290,7 @@ struct ddc_service *dal_ddc_service_create(
{
struct ddc_service *ddc_service;
ddc_service = dm_alloc(sizeof(struct ddc_service));
ddc_service = kzalloc(sizeof(struct ddc_service), GFP_KERNEL);
if (!ddc_service)
return NULL;
......@@ -298,7 +298,7 @@ struct ddc_service *dal_ddc_service_create(
if (construct(ddc_service, init_data))
return ddc_service;
dm_free(ddc_service);
kfree(ddc_service);
return NULL;
}
......@@ -315,7 +315,7 @@ void dal_ddc_service_destroy(struct ddc_service **ddc)
return;
}
destruct(*ddc);
dm_free(*ddc);
kfree(*ddc);
*ddc = NULL;
}
......
......@@ -160,7 +160,7 @@ void dc_destroy_resource_pool(struct dc *dc)
dc->res_pool->funcs->destroy(&dc->res_pool);
if (dc->hwseq)
dm_free(dc->hwseq);
kfree(dc->hwseq);
}
}
......
......@@ -34,7 +34,7 @@
static void destruct(struct dc_sink *sink)
{
if (sink->dc_container_id) {
dm_free(sink->dc_container_id);
kfree(sink->dc_container_id);
sink->dc_container_id = NULL;
}
}
......@@ -74,13 +74,13 @@ void dc_sink_release(struct dc_sink *sink)
if (atomic_read(&sink->ref_count) == 0) {
destruct(sink);
dm_free(sink);
kfree(sink);
}
}
struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)
{
struct dc_sink *sink = dm_alloc(sizeof(*sink));
struct dc_sink *sink = kzalloc(sizeof(*sink), GFP_KERNEL);
if (NULL == sink)
goto alloc_fail;
......@@ -93,7 +93,7 @@ struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)
return sink;
construct_fail:
dm_free(sink);
kfree(sink);
alloc_fail:
return NULL;
......@@ -117,7 +117,8 @@ bool dc_sink_set_container_id(struct dc_sink *dc_sink, const struct dc_container
{
if (dc_sink && container_id) {
if (!dc_sink->dc_container_id)
dc_sink->dc_container_id = dm_alloc(sizeof(*dc_sink->dc_container_id));
dc_sink->dc_container_id = kzalloc(sizeof(*dc_sink->dc_container_id),
GFP_KERNEL);
if (dc_sink->dc_container_id) {
memmove(&dc_sink->dc_container_id->guid, &container_id->guid,
......
......@@ -131,7 +131,7 @@ void dc_stream_release(struct dc_stream_state *stream)
if (atomic_read(&stream->ref_count) == 0) {
destruct(stream);
dm_free(stream);
kfree(stream);
}
}
}
......@@ -144,7 +144,7 @@ struct dc_stream_state *dc_create_stream_for_sink(
if (sink == NULL)
goto alloc_fail;
stream = dm_alloc(sizeof(struct dc_stream_state));
stream = kzalloc(sizeof(struct dc_stream_state), GFP_KERNEL);
if (NULL == stream)
goto alloc_fail;
......@@ -157,7 +157,7 @@ struct dc_stream_state *dc_create_stream_for_sink(
return stream;
construct_fail:
dm_free(stream);
kfree(stream);
alloc_fail:
return NULL;
......
......@@ -68,7 +68,8 @@ struct dc_plane_state *dc_create_plane_state(struct dc *dc)
{
struct dc *core_dc = dc;
struct dc_plane_state *plane_state = dm_alloc(sizeof(*plane_state));
struct dc_plane_state *plane_state = kzalloc(sizeof(*plane_state),
GFP_KERNEL);
if (NULL == plane_state)
goto alloc_fail;
......@@ -81,7 +82,7 @@ struct dc_plane_state *dc_create_plane_state(struct dc *dc)
return plane_state;
construct_fail:
dm_free(plane_state);
kfree(plane_state);
alloc_fail:
return NULL;
......@@ -133,7 +134,7 @@ void dc_plane_state_release(struct dc_plane_state *plane_state)
if (atomic_read(&plane_state->ref_count) == 0) {
destruct(plane_state);
dm_free(plane_state);
kfree(plane_state);
}
}
......@@ -149,14 +150,14 @@ void dc_gamma_release(struct dc_gamma **gamma)
atomic_dec(&(*gamma)->ref_count);
if (atomic_read(&(*gamma)->ref_count) == 0)
dm_free((*gamma));
kfree((*gamma));
*gamma = NULL;
}
struct dc_gamma *dc_create_gamma()
{
struct dc_gamma *gamma = dm_alloc(sizeof(*gamma));
struct dc_gamma *gamma = kzalloc(sizeof(*gamma), GFP_KERNEL);
if (gamma == NULL)
goto alloc_fail;
......@@ -181,12 +182,12 @@ void dc_transfer_func_release(struct dc_transfer_func *tf)
atomic_dec(&tf->ref_count);
if (atomic_read(&tf->ref_count) == 0)
dm_free(tf);
kfree(tf);
}
struct dc_transfer_func *dc_create_transfer_func()
{
struct dc_transfer_func *tf = dm_alloc(sizeof(*tf));
struct dc_transfer_func *tf = kzalloc(sizeof(*tf), GFP_KERNEL);
if (tf == NULL)
goto alloc_fail;
......
......@@ -462,7 +462,7 @@ struct abm *dce_abm_create(
const struct dce_abm_shift *abm_shift,
const struct dce_abm_mask *abm_mask)
{
struct dce_abm *abm_dce = dm_alloc(sizeof(*abm_dce));
struct dce_abm *abm_dce = kzalloc(sizeof(*abm_dce), GFP_KERNEL);
if (abm_dce == NULL) {
BREAK_TO_DEBUGGER();
......@@ -480,6 +480,6 @@ void dce_abm_destroy(struct abm **abm)
{
struct dce_abm *abm_dce = TO_DCE_ABM(*abm);
dm_free(abm_dce);
kfree(abm_dce);
*abm = NULL;
}
......@@ -897,7 +897,7 @@ void dce_aud_destroy(struct audio **audio)
{