summaryrefslogtreecommitdiff
path: root/include/linux/ntb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ntb.h')
-rw-r--r--include/linux/ntb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ntb.h b/include/linux/ntb.h
index 6f47562d477b..816bd9835bee 100644
--- a/include/linux/ntb.h
+++ b/include/linux/ntb.h
@@ -968,6 +968,9 @@ static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx,
*/
static inline u32 ntb_peer_spad_read(struct ntb_dev *ntb, int idx)
{
+ if (!ntb->ops->peer_spad_read)
+ return 0;
+
return ntb->ops->peer_spad_read(ntb, idx);
}