summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteven Wahl <Steve_Wahl@Dell.com>2016-12-08 20:02:28 +0300
committerJon Mason <jdmason@kudzu.us>2016-12-24 00:10:50 +0300
commit5c43c52d5fb6163120ae5d9a281c3b757ca6119c (patch)
treeff751fe1e706990e2cd0b773a54c06ea347c80d0 /include
parentbc034e52627a242bcf4343b791cbd263f65cfdcc (diff)
downloadlinux-5c43c52d5fb6163120ae5d9a281c3b757ca6119c.tar.xz
NTB: correct ntb_peer_spad_read for case when callback is not supplied.
Correct ntb_peer_spad_read for case when callback is not supplied Signed-off-by: Steve Wahl <Steve.Wahl@dell.com> Acked-by: Allen Hubbe <Allen.Hubbe@dell.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'include')
-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);
}