Fix response_size in ni6501_send_command (READ_PORT command) Signed-off-by: Luca Ellero <luca.ellero@xxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/ni_usb6501.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_usb6501.c b/drivers/staging/comedi/drivers/ni_usb6501.c index c99b693..91c0e22 100644 --- a/drivers/staging/comedi/drivers/ni_usb6501.c +++ b/drivers/staging/comedi/drivers/ni_usb6501.c @@ -193,8 +193,7 @@ static int ni6501_send_command(struct comedi_device *dev, int command, case READ_PORT: request_size = sizeof(READ_PORT_REQUEST); - /* 4 additional bytes for READ_PORT request */ - response_size = sizeof(GENERIC_RESPONSE) + 4; + response_size = sizeof(READ_PORT_RESPONSE); memcpy(tx, READ_PORT_REQUEST, request_size); -- 1.7.10.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel