mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 12:22:51 +07:00
amdgpu/dc: fix construct return values on irq service.
This just removes more unused return/errors paths. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
db6c3bdcfe
commit
6be663b5bd
@ -406,17 +406,14 @@ static const struct irq_service_funcs irq_service_funcs_dce110 = {
|
||||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static void construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
if (!dal_irq_service_construct(irq_service, init_data))
|
||||
return false;
|
||||
dal_irq_service_construct(irq_service, init_data);
|
||||
|
||||
irq_service->info = irq_source_info_dce110;
|
||||
irq_service->funcs = &irq_service_funcs_dce110;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct irq_service *dal_irq_service_dce110_create(
|
||||
@ -428,9 +425,6 @@ struct irq_service *dal_irq_service_dce110_create(
|
||||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
if (construct(irq_service, init_data))
|
||||
return irq_service;
|
||||
|
||||
kfree(irq_service);
|
||||
return NULL;
|
||||
construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
@ -265,17 +265,14 @@ static const struct irq_service_funcs irq_service_funcs_dce120 = {
|
||||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static void construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
if (!dal_irq_service_construct(irq_service, init_data))
|
||||
return false;
|
||||
dal_irq_service_construct(irq_service, init_data);
|
||||
|
||||
irq_service->info = irq_source_info_dce120;
|
||||
irq_service->funcs = &irq_service_funcs_dce120;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct irq_service *dal_irq_service_dce120_create(
|
||||
@ -287,9 +284,6 @@ struct irq_service *dal_irq_service_dce120_create(
|
||||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
if (construct(irq_service, init_data))
|
||||
return irq_service;
|
||||
|
||||
kfree(irq_service);
|
||||
return NULL;
|
||||
construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
@ -277,17 +277,14 @@ static const struct irq_service_funcs irq_service_funcs_dce80 = {
|
||||
.to_dal_irq_source = to_dal_irq_source_dce110
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static void construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
if (!dal_irq_service_construct(irq_service, init_data))
|
||||
return false;
|
||||
dal_irq_service_construct(irq_service, init_data);
|
||||
|
||||
irq_service->info = irq_source_info_dce80;
|
||||
irq_service->funcs = &irq_service_funcs_dce80;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct irq_service *dal_irq_service_dce80_create(
|
||||
@ -299,11 +296,8 @@ struct irq_service *dal_irq_service_dce80_create(
|
||||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
if (construct(irq_service, init_data))
|
||||
return irq_service;
|
||||
|
||||
kfree(irq_service);
|
||||
return NULL;
|
||||
construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
||||
|
||||
|
@ -332,17 +332,14 @@ static const struct irq_service_funcs irq_service_funcs_dcn10 = {
|
||||
.to_dal_irq_source = to_dal_irq_source_dcn10
|
||||
};
|
||||
|
||||
static bool construct(
|
||||
static void construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
if (!dal_irq_service_construct(irq_service, init_data))
|
||||
return false;
|
||||
dal_irq_service_construct(irq_service, init_data);
|
||||
|
||||
irq_service->info = irq_source_info_dcn10;
|
||||
irq_service->funcs = &irq_service_funcs_dcn10;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct irq_service *dal_irq_service_dcn10_create(
|
||||
@ -354,9 +351,6 @@ struct irq_service *dal_irq_service_dcn10_create(
|
||||
if (!irq_service)
|
||||
return NULL;
|
||||
|
||||
if (construct(irq_service, init_data))
|
||||
return irq_service;
|
||||
|
||||
kfree(irq_service);
|
||||
return NULL;
|
||||
construct(irq_service, init_data);
|
||||
return irq_service;
|
||||
}
|
||||
|
@ -48,15 +48,16 @@
|
||||
#define CTX \
|
||||
irq_service->ctx
|
||||
|
||||
bool dal_irq_service_construct(
|
||||
void dal_irq_service_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data)
|
||||
{
|
||||
if (!init_data || !init_data->ctx)
|
||||
return false;
|
||||
if (!init_data || !init_data->ctx) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
return;
|
||||
}
|
||||
|
||||
irq_service->ctx = init_data->ctx;
|
||||
return true;
|
||||
}
|
||||
|
||||
void dal_irq_service_destroy(struct irq_service **irq_service)
|
||||
|
@ -69,7 +69,7 @@ struct irq_service {
|
||||
const struct irq_service_funcs *funcs;
|
||||
};
|
||||
|
||||
bool dal_irq_service_construct(
|
||||
void dal_irq_service_construct(
|
||||
struct irq_service *irq_service,
|
||||
struct irq_service_init_data *init_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user