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

Peter Wang (王信友)
2025-12-24T06:14:29Z

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@collabora.com>

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