Skip to content

Commit

Permalink
cifs: Fix a debug message
Browse files Browse the repository at this point in the history
This debug message was never shown because it was checking for NULL
returns but extract_hostname() returns error pointers.

Fixes: 93d5cb5 ("cifs: Add support for failover in cifs_reconnect()")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Steve French <[email protected]>
Reviewed-by: Paulo Alcantara <[email protected]>
  • Loading branch information
Dan Carpenter authored and Steve French committed Jan 10, 2019
1 parent 1bdbe22 commit 8428817
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 8428817

Please sign in to comment.