Skip to content

Commit 5c43c52

Browse files
Steven Wahljonmason
authored andcommitted
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>
1 parent bc034e5 commit 5c43c52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/linux/ntb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,9 @@ static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx,
968968
*/
969969
static inline u32 ntb_peer_spad_read(struct ntb_dev *ntb, int idx)
970970
{
971+
if (!ntb->ops->peer_spad_read)
972+
return 0;
973+
971974
return ntb->ops->peer_spad_read(ntb, idx);
972975
}
973976

0 commit comments

Comments
 (0)