Instead of returning succesfully when ctrl-c is pressed return with -EINTR. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/usb/gadget/dfu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c index 1d35f50..ca7462b 100644 --- a/drivers/usb/gadget/dfu.c +++ b/drivers/usb/gadget/dfu.c @@ -779,8 +779,15 @@ int usb_dfu_register(struct usb_dfu_pdata *pdata) if (ret < 0) goto out; - if (ctrlc() || dfudetach) + if (dfudetach) { + ret = 0; goto out; + } + + if (ctrlc()) { + ret = -EINTR; + goto out; + } } out: -- 2.0.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox