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

Commit a5b90ef7 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman
Browse files

staging: dgnc: clean up the dgnc_get_modem_info()



the "ch" in dgnc_get_modem_info() was already checked before calling
this function and also if "ch" is not NULL, dgnc_get_mstat() returns
valid value so it doesn't need to check an error.

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b30ccde
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -2020,17 +2020,7 @@ static inline int dgnc_get_mstat(struct channel_t *ch)
static int dgnc_get_modem_info(struct channel_t *ch,
			       unsigned int  __user *value)
{
	int result;

	if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
		return -ENXIO;

	result = dgnc_get_mstat(ch);

	if (result < 0)
		return -ENXIO;

	return put_user(result, value);
	return put_user(dgnc_get_mstat(ch), value);
}

/*