Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a92b63e7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: usbtmc: fix switch statment



Steve Holland pointed out that we forgot to call break; in the switch
statment.  This probably resolves a lot of the bug reports I've gotten
for the driver lately.

Stupid me...

Reported-by: default avatarSteve Holland <sdh4@iastate.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3b6c023f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -927,21 +927,27 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	switch (cmd) {
	switch (cmd) {
	case USBTMC_IOCTL_CLEAR_OUT_HALT:
	case USBTMC_IOCTL_CLEAR_OUT_HALT:
		retval = usbtmc_ioctl_clear_out_halt(data);
		retval = usbtmc_ioctl_clear_out_halt(data);
		break;


	case USBTMC_IOCTL_CLEAR_IN_HALT:
	case USBTMC_IOCTL_CLEAR_IN_HALT:
		retval = usbtmc_ioctl_clear_in_halt(data);
		retval = usbtmc_ioctl_clear_in_halt(data);
		break;


	case USBTMC_IOCTL_INDICATOR_PULSE:
	case USBTMC_IOCTL_INDICATOR_PULSE:
		retval = usbtmc_ioctl_indicator_pulse(data);
		retval = usbtmc_ioctl_indicator_pulse(data);
		break;


	case USBTMC_IOCTL_CLEAR:
	case USBTMC_IOCTL_CLEAR:
		retval = usbtmc_ioctl_clear(data);
		retval = usbtmc_ioctl_clear(data);
		break;


	case USBTMC_IOCTL_ABORT_BULK_OUT:
	case USBTMC_IOCTL_ABORT_BULK_OUT:
		retval = usbtmc_ioctl_abort_bulk_out(data);
		retval = usbtmc_ioctl_abort_bulk_out(data);
		break;


	case USBTMC_IOCTL_ABORT_BULK_IN:
	case USBTMC_IOCTL_ABORT_BULK_IN:
		retval = usbtmc_ioctl_abort_bulk_in(data);
		retval = usbtmc_ioctl_abort_bulk_in(data);
		break;
	}
	}


	mutex_unlock(&data->io_mutex);
	mutex_unlock(&data->io_mutex);