Skip to content

Commit

Permalink
net/wan/fsl_ucc_hdlc: fix muram allocation error
Browse files Browse the repository at this point in the history
sizeof(priv->ucc_pram) is 4 as it is the size of a pointer, but we want
to reserve space for the struct ucc_hdlc_param.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Holger Brunck authored and David S. Miller committed May 22, 2017
1 parent a777f71 commit 85deed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wan/fsl_ucc_hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
}

/* Alloc parameter ram for ucc hdlc */
priv->ucc_pram_offset = qe_muram_alloc(sizeof(priv->ucc_pram),
priv->ucc_pram_offset = qe_muram_alloc(sizeof(struct ucc_hdlc_param),
ALIGNMENT_OF_UCC_HDLC_PRAM);

if (priv->ucc_pram_offset < 0) {
Expand Down

0 comments on commit 85deed5

Please sign in to comment.