Skip to content

Commit

Permalink
NTB: correct ntb_peer_spad_read for case when callback is not supplied.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Wahl authored and Jon Mason committed Dec 23, 2016
1 parent bc034e5 commit 5c43c52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/ntb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5c43c52

Please sign in to comment.