[PATCH v4 08/25] scsi: ufs: mediatek: Rework init function
Peter Wang (王信友)
peter.wang at mediatek.com
Tue Dec 23 22:14:19 PST 2025
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 at collabora.com>
Reviewed-by: Peter Wang <peter.wang at mediatek.com>
More information about the Linux-mediatek
mailing list