HID: playstation: sanity check DualSense calibration data.
[platform/kernel/linux-starfive.git] / fs / dlm / lowcomms.c
index 59f64c5..871d4e9 100644 (file)
@@ -1543,7 +1543,11 @@ static void process_recv_sockets(struct work_struct *work)
 
 static void process_listen_recv_socket(struct work_struct *work)
 {
-       accept_from_sock(&listen_con);
+       int ret;
+
+       do {
+               ret = accept_from_sock(&listen_con);
+       } while (!ret);
 }
 
 static void dlm_connect(struct connection *con)
@@ -1820,7 +1824,7 @@ static int dlm_listen_for_all(void)
        result = sock->ops->listen(sock, 5);
        if (result < 0) {
                dlm_close_sock(&listen_con.sock);
-               goto out;
+               return result;
        }
 
        return 0;
@@ -2023,7 +2027,6 @@ fail_listen:
        dlm_proto_ops = NULL;
 fail_proto_ops:
        dlm_allow_conn = 0;
-       dlm_close_sock(&listen_con.sock);
        work_stop();
 fail_local:
        deinit_local();