mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 21:30:43 +00:00
isdn/capi: make reset_ctr op truly optional
The CAPI controller operation reset_ctr is marked as optional, and not all drivers do implement it. Add a check to the kernel CAPI whether it exists before trying to call it. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a5e93151e4
commit
85a83560af
@ -1147,6 +1147,12 @@ load_unlock_out:
|
||||
if (ctr->state == CAPI_CTR_DETECTED)
|
||||
goto reset_unlock_out;
|
||||
|
||||
if (ctr->reset_ctr == NULL) {
|
||||
printk(KERN_DEBUG "kcapi: reset: no reset function\n");
|
||||
retval = -ESRCH;
|
||||
goto reset_unlock_out;
|
||||
}
|
||||
|
||||
ctr->reset_ctr(ctr);
|
||||
|
||||
retval = wait_on_ctr_state(ctr, CAPI_CTR_DETECTED);
|
||||
|
Loading…
Reference in New Issue
Block a user