Re: [PATCH 1/2] gpio: mt7621: report failure of devm_kasprintf()
From: Linus Walleij <hidden>
Date: 2018-12-07 09:46:47
Also in:
linux-gpio, linux-mediatek, lkml
From: Linus Walleij <hidden>
Date: 2018-12-07 09:46:47
Also in:
linux-gpio, linux-mediatek, lkml
On Wed, Nov 21, 2018 at 7:12 PM Nicholas Mc Guire [off-list ref] 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 <redacted>
Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621")Patch applied with Bartosz and Sean's tags. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel