Skip to content

Commit 72fc388

Browse files
whamemartinkpetersen
authored andcommitted
scsi: ufs: core: Remove error print for devm_add_action_or_reset()
When devm_add_action_or_reset() fails, it is due to a failed memory allocation and will thus return -ENOMEM. dev_err_probe() doesn't do anything when error is -ENOMEM. Therefore, remove the useless call to dev_err_probe() when devm_add_action_or_reset() fails, and just return the value instead. Signed-off-by: Waqar Hameed <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 7ec2bd6 commit 72fc388

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10515,8 +10515,7 @@ int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle)
1051510515
err = devm_add_action_or_reset(dev, ufshcd_devres_release,
1051610516
host);
1051710517
if (err)
10518-
return dev_err_probe(dev, err,
10519-
"failed to add ufshcd dealloc action\n");
10518+
return err;
1052010519

1052110520
host->nr_maps = HCTX_TYPE_POLL + 1;
1052210521
hba = shost_priv(host);

0 commit comments

Comments
 (0)