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

Commit 6c6baa84 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Greg Kroah-Hartman
Browse files

Staging: gdm724x: Use min instead of ternary operator



This patch replaces ternary operator with macro min as it shorter and
thus increases code readability. Macro min return the minimum of the
two compared values.
Made a semantic patch for changes:

@@
type T;
T x;
T y;
@@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd743442
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ static int gdm_mux_send_control(void *priv_dev, int request, int value,
	if (ret < 0)
		pr_err("usb_control_msg error: %d\n", ret);

	return ret < 0 ? ret : 0;
	return min(ret, 0);
}

static void release_usb(struct mux_dev *mux_dev)