Skip to content

Commit

Permalink
nfc: fdp: remove unnecessary labels
Browse files Browse the repository at this point in the history
Some labels are meaningless, so we delete them and use the
return statement instead of the goto statement.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
wengjianfeng authored and David S. Miller committed Jun 11, 2021
1 parent 62d3f4a commit 43fa32d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/nfc/fdp/fdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)
r = request_firmware(&info->ram_patch, FDP_RAM_PATCH_NAME, dev);
if (r < 0) {
nfc_err(dev, "RAM patch request error\n");
goto error;
return r;
}

data = (u8 *) info->ram_patch->data;
Expand All @@ -283,7 +283,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)
r = request_firmware(&info->otp_patch, FDP_OTP_PATCH_NAME, dev);
if (r < 0) {
nfc_err(dev, "OTP patch request error\n");
goto out;
return 0;
}

data = (u8 *) info->otp_patch->data;
Expand All @@ -295,10 +295,7 @@ static int fdp_nci_request_firmware(struct nci_dev *ndev)

dev_dbg(dev, "OTP patch version: %d, size: %d\n",
info->otp_patch_version, (int) info->otp_patch->size);
out:
return 0;
error:
return r;
}

static void fdp_nci_release_firmware(struct nci_dev *ndev)
Expand Down

0 comments on commit 43fa32d

Please sign in to comment.