Skip to content

Commit

Permalink
drm/edid: Deletion of an unnecessary check before the function call "…
Browse files Browse the repository at this point in the history
…release_firmware"

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Markus Elfring authored and Dave Airlie committed Nov 21, 2014
1 parent fc2d2bc commit 9084acf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/drm_edid_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ static void *edid_load(struct drm_connector *connector, const char *name,
name, connector_name);

out:
if (fw)
release_firmware(fw);
release_firmware(fw);
return edid;
}

Expand Down

0 comments on commit 9084acf

Please sign in to comment.