Commit 288903f6 authored by Catalina Mocanu's avatar Catalina Mocanu Committed by Greg Kroah-Hartman
Browse files

staging: iio: cdc: Don't put an else right after a return



This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return.

While at it, remove new line for symmetry with the rest of the code.

Signed-off-by: default avatarCatalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a5fcc6b
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -143,18 +143,14 @@ static int ad7150_read_event_config(struct iio_dev *indio_dev,
	case IIO_EV_TYPE_MAG_ADAPTIVE:
	case IIO_EV_TYPE_MAG_ADAPTIVE:
		if (dir == IIO_EV_DIR_RISING)
		if (dir == IIO_EV_DIR_RISING)
			return adaptive && (threshtype == 0x1);
			return adaptive && (threshtype == 0x1);
		else
		return adaptive && (threshtype == 0x0);
		return adaptive && (threshtype == 0x0);
	case IIO_EV_TYPE_THRESH_ADAPTIVE:
	case IIO_EV_TYPE_THRESH_ADAPTIVE:
		if (dir == IIO_EV_DIR_RISING)
		if (dir == IIO_EV_DIR_RISING)
			return adaptive && (threshtype == 0x3);
			return adaptive && (threshtype == 0x3);
		else
		return adaptive && (threshtype == 0x2);
		return adaptive && (threshtype == 0x2);

	case IIO_EV_TYPE_THRESH:
	case IIO_EV_TYPE_THRESH:
		if (dir == IIO_EV_DIR_RISING)
		if (dir == IIO_EV_DIR_RISING)
			return !adaptive && (threshtype == 0x1);
			return !adaptive && (threshtype == 0x1);
		else
		return !adaptive && (threshtype == 0x0);
		return !adaptive && (threshtype == 0x0);
	default:
	default:
		break;
		break;