From bb55815fe866ec38c632ea1b5a58f0d535201d4e Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 12 May 2011 03:04:54 +0200 Subject: [PATCH] nfctype2: Fix error path for meta information read --- plugins/nfctype2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/nfctype2.c b/plugins/nfctype2.c index 488e76e..a58853a 100644 --- a/plugins/nfctype2.c +++ b/plugins/nfctype2.c @@ -93,7 +93,6 @@ static int meta_recv(uint8_t *resp, int length, void *data) static int nfctype2_read_meta(uint32_t adapter_idx, uint32_t target_idx, struct type2_tag *tag) { - int err; struct type2_cmd cmd; DBG(""); @@ -101,11 +100,7 @@ static int nfctype2_read_meta(uint32_t adapter_idx, uint32_t target_idx, struct cmd.cmd = CMD_READ; cmd.block = META_BLOCK_START; - err = near_adapter_send(adapter_idx, (uint8_t *)&cmd, sizeof(cmd), meta_recv, tag); - if (err < 0) - near_adapter_disconnect(adapter_idx); - - return 0; + return near_adapter_send(adapter_idx, (uint8_t *)&cmd, sizeof(cmd), meta_recv, tag); } static int nfctype2_read_tag(uint32_t adapter_idx, -- 2.7.4