RE: [PATCH v2] EDAC/igen6: Fix error handling in igen6_edac driver

From: Zhuo, Qiuxu

Date: Wed Nov 05 2025 - 07:27:34 EST


> From: Ma Ke <make24@xxxxxxxxxxx>
> Sent: Wednesday, November 5, 2025 5:03 PM
> To: Luck, Tony <tony.luck@xxxxxxxxx>; Zhuo, Qiuxu <qiuxu.zhuo@xxxxxxxxx>;
> bp@xxxxxxxxx
> Cc: linux-edac@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; akpm@linux-
> foundation.org; Ma Ke <make24@xxxxxxxxxxx>
> Subject: [PATCH v2] EDAC/igen6: Fix error handling in igen6_edac driver
>
> The igen6_edac driver calls device_initialize() for all memory controllers in
> igen6_register_mci(), but misses corresponding
> put_device() calls in error paths and during normal shutdown in
> igen6_unregister_mcis().
>
> Adding the missing put_device() calls improves code readability and ensures
> proper reference counting for the device structure.
>
> Found by code review.
>
> Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>

LGTM, thanks.

Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>

> ---
> Changes in v2:
> - modified the patch, thanks for developer's suggestions;
> - removed Fixes line.
> [...]