lkml.org 
[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 03/87] can: gs_usb: fix return value of the "set_bittiming" callback
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Wolfgang Grandegger <wg@grandegger.com>

    commit d5b42e6607661b198d8b26a0c30969605b1bf5c7 upstream.

    The "set_bittiming" callback treats a positive return value as error!
    For that reason "can_changelink()" will quit silently after setting
    the bittiming values without processing ctrlmode, restart-ms, etc.

    Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/can/usb/gs_usb.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/can/usb/gs_usb.c
    +++ b/drivers/net/can/usb/gs_usb.c
    @@ -430,7 +430,7 @@ static int gs_usb_set_bittiming(struct n
    dev_err(netdev->dev.parent, "Couldn't set bittimings (err=%d)",
    rc);

    - return rc;
    + return (rc > 0) ? 0 : rc;
    }

    static void gs_usb_xmit_callback(struct urb *urb)

    \
     
     \ /
      Last update: 2018-01-15 15:23    [W:3.876 / U:0.404 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site