Input: sur40 - fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 24 Aug 2015 17:51:04 +0000 (10:51 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 24 Aug 2015 17:55:24 +0000 (10:55 -0700)
Propagate error code on failure, or upper layers will be confused by
returned 0 (success) code.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/sur40.c

index 8be7b9b79f20b307059bab1f6825abef99dcd718..3f117637e832daf02abac291cae9e5701e5714e1 100644 (file)
@@ -581,6 +581,7 @@ static int sur40_probe(struct usb_interface *interface,
        sur40->alloc_ctx = vb2_dma_sg_init_ctx(sur40->dev);
        if (IS_ERR(sur40->alloc_ctx)) {
                dev_err(sur40->dev, "Can't allocate buffer context");
+               error = PTR_ERR(sur40->alloc_ctx);
                goto err_unreg_v4l2;
        }