OSDN Git Service

staging: wfx: simplify API coherency check
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Mon, 13 Sep 2021 13:01:43 +0000 (15:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Sep 2021 07:16:32 +0000 (09:16 +0200)
commit2ac7521bf99ce118c66e359bde5d40fea2730f15
tree8000a09827c2a87e6b6adcd9ed004e4548ecb17d
parent08127ad2a79b74576a139d6fcb8d40b4f0105461
staging: wfx: simplify API coherency check

The 'channel' argument of hif_join() should never be NULL. hif_join()
does not have the responsibility to recover bug of caller.

In current code, if the argument channel is NULL, memory leaks. The new
code just emit a warning and does not give the illusion that it is
supported (and indeed a Oops will probably raise a few lines below).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-13-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hif_tx.c