nfctype1: Improve returned errors consistency
authorWiktor Lawski <wiktor.lawski@tieto.com>
Mon, 3 Sep 2012 09:57:26 +0000 (11:57 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 7 Sep 2012 15:08:35 +0000 (17:08 +0200)
Match returned error and message with Tag Type 2.

plugins/nfctype1.c

index 52ed597..b1c1027 100644 (file)
@@ -627,8 +627,8 @@ static int nfctype1_write(uint32_t adapter_idx, uint32_t target_idx,
         * is TYPE1_STATIC_MAX_DATA_SIZE */
        if (near_tag_get_memory_layout(tag) == NEAR_TAG_MEMORY_STATIC) {
                if ((ndef->length + 3) > TYPE1_STATIC_MAX_DATA_SIZE) {
-                       near_error("not enough space on data");
-                       return -ENOMEM;
+                       near_error("not enough space on tag");
+                       return -ENOSPC;
                }
        }