Skip to content

Commit

Permalink
net/mlxfw: remove redundant goto on error check
Browse files Browse the repository at this point in the history
The check to see of err is set and the subsequent goto is extraneous
as the next statement is where the goto is jumping to. Remove this
redundant check and goto.

Detected by CoverityScan, CID#1437734 ("Identical code for
different branches")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jun 6, 2017
1 parent bb36314 commit 928a759
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,6 @@ static int mlxfw_mfa2_file_cb_offset_xz(const struct mlxfw_mfa2_file *mfa2_file,
dec_buf.out_pos = 0;
dec_buf.out_size = size;
err = mlxfw_mfa2_xz_dec_run(xz_dec, &dec_buf, &finished);
if (err)
goto out;
out:
xz_dec_end(xz_dec);
return err;
Expand Down

0 comments on commit 928a759

Please sign in to comment.