From 2eef5ce36b71b717669308e795f70bcc95b56204 Mon Sep 17 00:00:00 2001 From: Krzysztof Majzerowicz-Jaszcz Date: Tue, 8 Nov 2022 11:47:23 +0000 Subject: [PATCH] Fix for using uninitialized variable in printk This commit fixes the case of using unintialized variable in error handling path after failed core addition. Signed-off-by: Krzysztof Majzerowicz-Jaszcz --- modules/cas_cache/volume/vol_block_dev_top.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/cas_cache/volume/vol_block_dev_top.c b/modules/cas_cache/volume/vol_block_dev_top.c index 3444103..37fc77b 100644 --- a/modules/cas_cache/volume/vol_block_dev_top.c +++ b/modules/cas_cache/volume/vol_block_dev_top.c @@ -516,7 +516,6 @@ static int kcas_volume_create_exported_object(ocf_volume_t volume, const char *name, void *priv, struct cas_exp_obj_ops *ops) { struct bd_object *bvol = bd_object(volume); - char dev_name[DISK_NAME_LEN]; int result; bvol->expobj_wq = alloc_workqueue("expobj_wq_%s", @@ -539,7 +538,7 @@ static int kcas_volume_create_exported_object(ocf_volume_t volume, end: if (result) { printk(KERN_ERR "Cannot create exported object %s. Error code %d\n", - dev_name, result); + name, result); } return result; }