]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb/client: use %pe to print error pointer
authorFredric Cover <fredric.cover.lkernel@gmail.com>
Tue, 23 Jun 2026 16:49:15 +0000 (09:49 -0700)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Jun 2026 15:33:51 +0000 (10:33 -0500)
Currently, __reconnect_target_locked() prints the error pointer
'hostname' using PTR_ERR() and %ld, printing only the error code.

Fix this by using by using %pe to print the error symbolic code instead,
and remove PTR_ERR().

Signed-off-by: Fredric Cover <fredric.cover.lkernel@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c

index 74197766471cb874c317cfeb137f50c17271e260..85aec302c89e106f3c991dd0166c8933bc78edd4 100644 (file)
@@ -457,8 +457,8 @@ static int __reconnect_target_locked(struct TCP_Server_Info *server,
                                server->hostname = hostname;
                                spin_unlock(&server->srv_lock);
                        } else {
-                               cifs_dbg(FYI, "%s: couldn't extract hostname or address from dfs target: %ld\n",
-                                        __func__, PTR_ERR(hostname));
+                               cifs_dbg(FYI, "%s: couldn't extract hostname or address from dfs target: %pe\n",
+                                        __func__, hostname);
                                cifs_dbg(FYI, "%s: default to last target server: %s\n", __func__,
                                         server->hostname);
                        }