summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@keymile.com>2017-05-22 10:31:15 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-22 19:28:45 +0300
commit85deed56032b6c98b541895bfda9bdd74f6ed987 (patch)
tree2c98cf841098b14e5ed03cdc52deeacb5a13fa0b /drivers/net/wan
parenta777f715caf0ff95652a872d1af24942cf5002fc (diff)
downloadlinux-85deed56032b6c98b541895bfda9bdd74f6ed987.tar.xz
net/wan/fsl_ucc_hdlc: fix muram allocation error
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>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/fsl_ucc_hdlc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index e9b2d687f150..33df76405b86 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -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) {