Commit c0d42c8e authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: drbd_send(): Return a "real" error code if we have no socket

Q: Can this case even trigger?  Is failing this way any better than one
that causes a NULL pointer access?
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent e90285e0
...@@ -1703,7 +1703,7 @@ int drbd_send(struct drbd_tconn *tconn, struct socket *sock, ...@@ -1703,7 +1703,7 @@ int drbd_send(struct drbd_tconn *tconn, struct socket *sock,
int rv, sent = 0; int rv, sent = 0;
if (!sock) if (!sock)
return -1000; return -EBADR;
/* THINK if (signal_pending) return ... ? */ /* THINK if (signal_pending) return ... ? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment