Skip to content

Commit

Permalink
drbd: drbd_send(): Return a "real" error code if we have no socket
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent e90285e commit c0d42c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... ? */

Expand Down

0 comments on commit c0d42c8

Please sign in to comment.