[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCBEU336qqWnCvCVDuJ8ffOaXK5-jnUM0fuabdnmq8ZvWQ@mail.gmail.com>
Date: Thu, 22 Nov 2018 22:45:29 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: hofrat@...dl.org
Cc: ulf.hansson@...aro.org, khilman@...libre.com,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
carlo@...one.org, linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mmc: meson-mx-sdio: check devm_kasprintf for failure
On Thu, Nov 22, 2018 at 10:41 AM Nicholas Mc Guire <hofrat@...dl.org> wrote:
>
> devm_kasprintf() may return NULL on failure of internal allocation thus
> the assignments to init.name are not safe if not checked. On error
> meson_mx_mmc_register_clks() returns negative values so -ENOMEM in the
> (unlikely) failure case of devm_kasprintf() should be fine here.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs")
Acked-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
thank you for the patch!
I tested the non-error case on my Odroid-C1 and it still works fine.
Regards
Martin
Powered by blists - more mailing lists