Merge tag 'ntb-4.10' of git://github.com/jonmason/ntb
[linux-2.6-block.git] / include / linux / ntb.h
index 50a7dbe88cf344478f109a94bb81a83c8ef335c9..de87ceac110e2f883a28144764340857106e0855 100644 (file)
@@ -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);
 }