summary refs log tree commit diff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-01-05 15:25:29 +0300
committerSteve French <stfrench@microsoft.com>2019-01-10 14:32:27 -0600
commit8428817dc40006dca0a531cfa06e89cb3b41790d (patch)
treeab30d93667c8f8463752c470fa4791c1f26a5479 /fs/cifs/connect.c
parent1bdbe227492075d058e37cb3d400e6468d0095b5 (diff)
downloadlinux-8428817dc40006dca0a531cfa06e89cb3b41790d.tar.gz
cifs: Fix a debug message
This debug message was never shown because it was checking for NULL
returns but extract_hostname() returns error pointers.

Fixes: 93d5cb517db3 ("cifs: Add support for failover in cifs_reconnect()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f66529679ca2..683310f26171 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -433,9 +433,10 @@ static void reconn_inval_dfs_target(struct TCP_Server_Info *server,
 	kfree(server->hostname);
 
 	server->hostname = extract_hostname(name);
-	if (!server->hostname) {
-		cifs_dbg(FYI, "%s: failed to extract hostname from target: %d\n",
-			 __func__, -ENOMEM);
+	if (IS_ERR(server->hostname)) {
+		cifs_dbg(FYI,
+			 "%s: failed to extract hostname from target: %ld\n",
+			 __func__, PTR_ERR(server->hostname));
 	}
 }