Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision e18e0d67759e614c32642ec217525906007f52db)
+++ uspace/lib/usb/src/hidparser.c	(revision 55e388a14a1a3f701bcc2f006839fbbaba0b934f)
@@ -84,5 +84,5 @@
 {
    if(parser == NULL) {
-	return -1;
+	return EINVAL;
    }
 
@@ -115,4 +115,8 @@
 	size_t offset_output=0;
 	size_t offset_feature=0;
+
+	if(usb_hid_parser_init(parser) != EOK) {
+		return EINVAL;
+	}
 	
 
@@ -128,5 +132,5 @@
 
 			if((i+USB_HID_ITEM_SIZE(data[i]))>= size){
-				return -1; // TODO ERROR CODE
+				return EINVAL; // TODO ERROR CODE
 			}
 			
@@ -530,4 +534,8 @@
 void usb_hid_descriptor_print(usb_hid_report_parser_t *parser)
 {
+	if(parser == NULL) {
+		return;
+	}
+	
 	usb_log_debug("INPUT:\n");
 	usb_hid_descriptor_print_list(&parser->input);
@@ -615,4 +623,9 @@
 	size_t j=0;
 
+	if(parser == NULL) {
+		return EINVAL;
+	}
+
+	
 	// get the size of result keycodes array
 	usb_hid_report_path_t path;
@@ -737,9 +750,13 @@
 int usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
 	const usb_hid_report_path_t *path)
-{
+{	
 	int ret = 0;
 	link_t *item;
 	usb_hid_report_item_t *report_item;
 
+	if(parser == NULL) {
+		return EINVAL;
+	}
+	
 	item = (&parser->input)->next;
 	while(&parser->input != item) {
