mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
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:
parent
e90285e0ba
commit
c0d42c8e57
@ -1703,7 +1703,7 @@ int drbd_send(struct drbd_tconn *tconn, struct socket *sock,
|
||||
int rv, sent = 0;
|
||||
|
||||
if (!sock)
|
||||
return -1000;
|
||||
return -EBADR;
|
||||
|
||||
/* THINK if (signal_pending) return ... ? */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user