1
0
Fork 0

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: 93d5cb517d ("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>
hifive-unleashed-5.1
Dan Carpenter 2019-01-05 15:25:29 +03:00 committed by Steve French
parent 1bdbe22749
commit 8428817dc4
1 changed files with 4 additions and 3 deletions

View File

@ -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));
}
}