Skip to content

Commit

Permalink
drm/nouveau/nvkm/outp: Use WARN_ON() in conditionals in nvkm_outp_ini…
Browse files Browse the repository at this point in the history
…t_route()

Signed-off-by: Lyude Paul <lyude@redhat.com>
  • Loading branch information
Lyude authored and intel-lab-lkp committed Apr 7, 2023
1 parent e3adc46 commit 19561e9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,8 @@ nvkm_outp_init_route(struct nvkm_outp *outp)
return;

ior = nvkm_ior_find(disp, type, -1);
if (!ior) {
WARN_ON(1);
if (WARN_ON(!ior))
return;
}

/* Determine the specific OR, if any, this device is attached to. */
if (ior->func->route.get) {
Expand All @@ -248,10 +246,8 @@ nvkm_outp_init_route(struct nvkm_outp *outp)
}

ior = nvkm_ior_find(disp, type, id);
if (!ior) {
WARN_ON(1);
if (WARN_ON(!ior))
return;
}

/* Determine if the OR is already configured for this device. */
ior->func->state(ior, &ior->arm);
Expand Down

0 comments on commit 19561e9

Please sign in to comment.