Re: [PATCH 1/2] gpio: mt7621: report failure of devm_kasprintf()

From: Linus Walleij
Date: Fri Dec 07 2018 - 04:46:47 EST


On Wed, Nov 21, 2018 at 7:12 PM Nicholas Mc Guire <hofrat@xxxxxxxxx> wrote:

> kasprintf() may return NULL on failure of internal allocation thus the
> assigned label is not safe if not explicitly checked. On error
> mediatek_gpio_bank_probe() returns negative values so -ENOMEM in the
> (unlikely) failure case should be fine here.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
> Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621")

Patch applied with Bartosz and Sean's tags.

Yours,
Linus Walleij