From: Holger Brunck Date: Mon, 22 May 2017 07:31:15 +0000 (+0200) Subject: net/wan/fsl_ucc_hdlc: fix muram allocation error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85deed56032b6c98b541895bfda9bdd74f6ed987;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Zhao Qiang Signed-off-by: David S. Miller --- 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) {