Index: uspace/lib/usbdev/src/devpoll.c
===================================================================
--- uspace/lib/usbdev/src/devpoll.c	(revision 2703331b2089b0d3f27edabf3983a16394964568)
+++ uspace/lib/usbdev/src/devpoll.c	(revision b81410fcf99e55d6fef37a1ff0a6e10f437e8cb6)
@@ -70,5 +70,5 @@
 	
 	if (polling_data->auto_polling.debug > 0) {
-		usb_endpoint_mapping_t *mapping
+		const usb_endpoint_mapping_t *mapping
 		    = &polling_data->dev->pipes[polling_data->pipe_index];
 		usb_log_debug("Poll%p: started polling of `%s' - " \
@@ -85,8 +85,6 @@
 	size_t failed_attempts = 0;
 	while (failed_attempts <= polling_data->auto_polling.max_failures) {
-		int rc;
-
 		size_t actual_size;
-		rc = usb_pipe_read(pipe, polling_data->buffer,
+		const int rc = usb_pipe_read(pipe, polling_data->buffer,
 		    polling_data->request_size, &actual_size);
 
@@ -113,6 +111,5 @@
 			 */
 			usb_request_clear_endpoint_halt(
-			    &polling_data->dev->ctrl_pipe,
-			    pipe->endpoint_no);
+			    &polling_data->dev->ctrl_pipe, pipe->endpoint_no);
 		}
 
@@ -196,15 +193,4 @@
     usb_polling_terminted_callback_t terminated_callback, void *arg)
 {
-	if ((dev == NULL) || (callback == NULL)) {
-		return EBADMEM;
-	}
-	if (request_size == 0) {
-		return EINVAL;
-	}
-	if ((dev->pipes[pipe_index].pipe.transfer_type != USB_TRANSFER_INTERRUPT)
-	    || (dev->pipes[pipe_index].pipe.direction != USB_DIRECTION_IN)) {
-		return EINVAL;
-	}
-
 	const usb_device_auto_polling_t auto_polling = {
 		.debug = 1,
@@ -242,8 +228,9 @@
     size_t request_size, void *arg)
 {
-	if (dev == NULL) {
+	if ((dev == NULL) || (polling == NULL) || (polling->on_data == NULL)) {
 		return EBADMEM;
 	}
-	if (pipe_index >= dev->pipes_count) {
+
+	if (pipe_index >= dev->pipes_count || request_size == 0) {
 		return EINVAL;
 	}
@@ -251,7 +238,4 @@
 	    || (dev->pipes[pipe_index].pipe.direction != USB_DIRECTION_IN)) {
 		return EINVAL;
-	}
-	if ((polling == NULL) || (polling->on_data == NULL)) {
-		return EBADMEM;
 	}
 
