Re: [PATCH] gpio: eic-sprd: break loop when getting NULL device resource

From: Linus Walleij
Date: Wed Dec 09 2020 - 03:43:18 EST


On Wed, Dec 9, 2020 at 6:51 AM Chunyan Zhang <zhang.lyra@xxxxxxxxx> wrote:

> EIC controller have unfixed numbers of banks on different Spreadtrum SoCs,
> and each bank has its own base address, the loop of getting there base
> address in driver should break if the resource gotten via
> platform_get_resource() is NULL already. The later ones would be all NULL
> even if the loop continues.
>
> Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support")
> Signed-off-by: Chunyan Zhang <chunyan.zhang@xxxxxxxxxx>

Patch applied for fixes!

Yours,
Linus Walleij