Thread (52 messages) 52 messages, 7 authors, 2026-01-09

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

From: Peter Wang (王信友) <peter.wang@mediatek.com>
Date: 2025-12-24 06:14:29
Also in: linux-devicetree, linux-mediatek, linux-scsi, lkml

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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help