mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-15 02:57:49 +00:00
isdn: isdnloop: fix pointer dereference bug
clang has spotted an ancient code bug and warns about it with: drivers/isdn/isdnloop/isdnloop.c:573:12: error: address of array 'card->rcard' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] This is an array of pointers, so we should check if a specific pointer exists in the array before using it, not whether the array itself exists. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f096ca63ca
commit
8a72b81e6d
1 changed files with 1 additions and 1 deletions
|
@ -570,7 +570,7 @@ isdnloop_atimeout(isdnloop_card *card, int ch)
|
|||
char buf[60];
|
||||
|
||||
spin_lock_irqsave(&card->isdnloop_lock, flags);
|
||||
if (card->rcard) {
|
||||
if (card->rcard[ch]) {
|
||||
isdnloop_fake(card->rcard[ch], "DDIS_I", card->rch[ch] + 1);
|
||||
card->rcard[ch]->rcard[card->rch[ch]] = NULL;
|
||||
card->rcard[ch] = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue