Skip to content

Commit

Permalink
radeon_cp: Remove unneeded tests for NULL before calling release_firm…
Browse files Browse the repository at this point in the history
…ware()

release_firmware() does its own tests for NULL pointers so there's no
need to explicitly test before calling it.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
jjuhl authored and Jiri Kosina committed Apr 30, 2012
1 parent 42a6bd2 commit c69a6ca
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/gpu/drm/radeon/radeon_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,14 +1827,10 @@ void radeon_do_release(struct drm_device * dev)
r600_do_cleanup_cp(dev);
else
radeon_do_cleanup_cp(dev);
if (dev_priv->me_fw) {
release_firmware(dev_priv->me_fw);
dev_priv->me_fw = NULL;
}
if (dev_priv->pfp_fw) {
release_firmware(dev_priv->pfp_fw);
dev_priv->pfp_fw = NULL;
}
release_firmware(dev_priv->me_fw);
dev_priv->me_fw = NULL;
release_firmware(dev_priv->pfp_fw);
dev_priv->pfp_fw = NULL;
}
}

Expand Down

0 comments on commit c69a6ca

Please sign in to comment.