summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-20 08:59:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-20 08:59:23 +0200
commite8f4118f4297f93e82ebcf4dd1eb6e48fead592e (patch)
tree7cc982375122242b71036c8b8154d972da1b84f7 /fs/cifs/connect.c
parentde9257ae1d3b0d8856955045d194e3ff4f278394 (diff)
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e (diff)
Merge 5.19-rc3 into staging-next
This resolves the merge issue with: drivers/staging/r8188eu/os_dep/ioctl_linux.c Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d46702f5a663..1849e3411487 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -97,6 +97,10 @@ static int reconn_set_ipaddr_from_hostname(struct TCP_Server_Info *server)
if (!server->hostname)
return -EINVAL;
+ /* if server hostname isn't populated, there's nothing to do here */
+ if (server->hostname[0] == '\0')
+ return 0;
+
len = strlen(server->hostname) + 3;
unc = kmalloc(len, GFP_KERNEL);