Skip to content

Commit

Permalink
net: farsync: replace comparison to NULL with "fst_card_array[i]"
Browse files Browse the repository at this point in the history
According to the chackpatch.pl, comparison to NULL could
be written "fst_card_array[i]".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Peng Li authored and David S. Miller committed Jun 8, 2021
1 parent f01f906 commit f23a3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wan/farsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ fst_process_tx_work_q(struct tasklet_struct *unused)
*/
for (i = 0; i < FST_MAX_CARDS; i++) {
if (work_txq & 0x01) {
if (fst_card_array[i] != NULL) {
if (fst_card_array[i]) {
dbg(DBG_TX, "Calling tx bh for card %d\n", i);
do_bottom_half_tx(fst_card_array[i]);
}
Expand Down Expand Up @@ -639,7 +639,7 @@ fst_process_int_work_q(struct tasklet_struct *unused)
*/
for (i = 0; i < FST_MAX_CARDS; i++) {
if (work_intq & 0x01) {
if (fst_card_array[i] != NULL) {
if (fst_card_array[i]) {
dbg(DBG_INTR,
"Calling rx & tx bh for card %d\n", i);
do_bottom_half_rx(fst_card_array[i]);
Expand Down

0 comments on commit f23a3da

Please sign in to comment.