From: Jesper Juhl Date: Mon, 9 Apr 2012 20:49:57 +0000 (+0200) Subject: radeon_cp: Remove unneeded tests for NULL before calling release_firmware() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c69a6ca1a4e398e7e85cab792ddbd874d9335233;p=openwrt%2Fstaging%2Fblogic.git radeon_cp: Remove unneeded tests for NULL before calling release_firmware() 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 0ebb7d4796fa..ef67e181377b 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -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; } }