On Tue, May 28, 2013 at 3:05 PM, Xiang Wang <[email protected]> wrote:
> From: Xiang Wang <[email protected]>
>
> pdev->phy is of type "struct mmp_pdma_phy *". But when
> allocating memory for it, "struct mmp_pdma_chan" is used
> by mistake.

Have you tested it?

> Signed-off-by: Xiang Wang <[email protected]>
> ---
>  drivers/dma/mmp_pdma.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
> index c26699f..76a8dcf 100644
> --- a/drivers/dma/mmp_pdma.c
> +++ b/drivers/dma/mmp_pdma.c
> @@ -801,7 +801,7 @@ static int mmp_pdma_probe(struct platform_device *op)
>         }
>
>         pdev->phy = devm_kzalloc(pdev->dev,
> -               dma_channels * sizeof(struct mmp_pdma_chan), GFP_KERNEL);
> +               dma_channels * sizeof(struct mmp_pdma_phy), GFP_KERNEL);

For me it seems you did get how it works.

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to