Merge pull request #1404 from kmajzero/failed_add_core_uninitialized

Fix for using uninitialized variable in printk
This commit is contained in:
Robert Baldyga 2022-11-10 17:25:54 +01:00 committed by GitHub
commit 92e0a8cf06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) const char *name, void *priv, struct cas_exp_obj_ops *ops)
{ {
struct bd_object *bvol = bd_object(volume); struct bd_object *bvol = bd_object(volume);
char dev_name[DISK_NAME_LEN];
int result; int result;
bvol->expobj_wq = alloc_workqueue("expobj_wq_%s", bvol->expobj_wq = alloc_workqueue("expobj_wq_%s",
@ -539,7 +538,7 @@ static int kcas_volume_create_exported_object(ocf_volume_t volume,
end: end:
if (result) { if (result) {
printk(KERN_ERR "Cannot create exported object %s. Error code %d\n", printk(KERN_ERR "Cannot create exported object %s. Error code %d\n",
dev_name, result); name, result);
} }
return result; return result;
} }