]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: rsi: Slightly simplify rsi_set_channel()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 20 Mar 2023 16:13:42 +0000 (17:13 +0100)
committerKalle Valo <kvalo@kernel.org>
Fri, 31 Mar 2023 14:45:50 +0000 (17:45 +0300)
commit8de7838acfa3309fcc4c6160cb230ee79f582b18
treef853c9a0c34c394ab4bcb6bc091c3fbf8a316d16
parentc7e39d70613c113b5ac667beeb3cacb242c6a4cb
wifi: rsi: Slightly simplify rsi_set_channel()

There is no point in allocating 'skb' and then freeing it if !channel.

Make the sanity check first to slightly simplify the code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/29bf0296bd939e3f6952272bfdcc73b22edbc374.1679328588.git.christophe.jaillet@wanadoo.fr
drivers/net/wireless/rsi/rsi_91x_mgmt.c