Re: [PATCH v4 08/25] scsi: ufs: mediatek: Rework init function

From: Peter Wang (王信友)
Date: Wed Dec 24 2025 - 01:14:37 EST


On Thu, 2025-12-18 at 13:54 +0100, Nicolas Frattaroli wrote:
> Printing an error message on ENOMEM is pointless. The print will not
> work because there is no memory.
>
> Adding an of_match_device to the init function is pointless. Why
> would a
> different device with a different probe function ever use the same
> init
> function? Get rid of it.
>
> zero-initialising an error variable just so you can then goto a bare
> return statement with that error variable to signal success is also
> pointless, just return directly, there's no unwind being done.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>

Reviewed-by: Peter Wang <peter.wang@xxxxxxxxxxxx>