Re: [PATCH 02/13] libmultipath: Add basic gendisk support
From: John Garry
Date: Thu Feb 26 2026 - 04:05:28 EST
On 26/02/2026 02:16, Benjamin Marzinski wrote:
struct mpath_head_template is introduced as a method for drivers toYou're dereferencing mpath_disk here, before the check if it's NULL.
provide custom multipath functionality.
Signed-off-by: John Garry<john.g.garry@xxxxxxxxxx>
---
+
+void mpath_device_set_live(struct mpath_disk *mpath_disk,
+ struct mpath_device *mpath_device)
+{
+ struct mpath_head *mpath_head = mpath_disk->mpath_head;
-Ben
+ int ret;
+
+ if (!mpath_disk)
Yeah, this NULL check is not needed.
Thanks!