]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nfc: st-nci: remove unnecessary assignment and label
authorwengjianfeng <wengjianfeng@yulong.com>
Mon, 24 May 2021 02:11:23 +0000 (10:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2021 20:12:51 +0000 (13:12 -0700)
In function st_nci_hci_network_init, the variable r is assigned then
goto exit label, which just return r, so we use return to replace it.
and exit label only used once at here, so we remove exit label.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/st-nci/se.c

index 1cba8f69d3aee7a0d5c341529d4ee56622bb3bdb..8657e025166fa09fc03c8e0f4344124e2fa237bc 100644 (file)
@@ -534,10 +534,8 @@ static int st_nci_hci_network_init(struct nci_dev *ndev)
        dest_params =
                kzalloc(sizeof(struct core_conn_create_dest_spec_params) +
                        sizeof(struct dest_spec_params), GFP_KERNEL);
-       if (dest_params == NULL) {
-               r = -ENOMEM;
-               goto exit;
-       }
+       if (dest_params == NULL)
+               return -ENOMEM;
 
        dest_params->type = NCI_DESTINATION_SPECIFIC_PARAM_NFCEE_TYPE;
        dest_params->length = sizeof(struct dest_spec_params);
@@ -594,8 +592,6 @@ static int st_nci_hci_network_init(struct nci_dev *ndev)
 
 free_dest_params:
        kfree(dest_params);
-
-exit:
        return r;
 }