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: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
Andreas Gruenbacher 2010-12-09 23:52:22 +01:00 committed by Philipp Reisner
parent e90285e0ba
commit c0d42c8e57
1 changed files with 1 additions and 1 deletions

View File

@ -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 ... ? */