Received: by 10.223.185.116 with SMTP id b49csp6380953wrg; Wed, 28 Feb 2018 08:28:50 -0800 (PST) X-Google-Smtp-Source: AH8x224GUsErvPEgg0Zd+ITq3S6PDtRsCMQcow8HPxFIK9a8kybHmHPtgnqIl0RvPKnA1y/pUs9D X-Received: by 10.99.60.8 with SMTP id j8mr14746765pga.209.1519835329974; Wed, 28 Feb 2018 08:28:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835329; cv=none; d=google.com; s=arc-20160816; b=TId56dD3iQYo+D9A0BaP1M6rgeW7ZsY/AAP0aHL76VvfjXtAjc1DMbRDVfWWrLCwUb 3vT7vknwnG7tcMvenIj3XC/Qwf23UKUIqjwYLkOsPSk22/hKfiqSI6O3H0d3B6frMJUP 7j/au46c7Knxdyy7baG1UtpdtOzu6mKqY40ruQfEyxXbNzEsuZCOuHi7Gs/0Ht0nKQsn 0VdfccgTetXUMiVqJ9LO4oqMMZKwjM70CAmCGtxrJJx8geT7igQPuGc0CSwLrh9s4/Sa Dp2LVag/VK/TgK4NEElVdqVzPqTbjrDtpXSwKZUFTKQe5kRPKW35wEmInawk4YG5h2gV N0Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=qfeiSb0wLJisfyPKrqcFhXiJyl8RfZVtiUk6zNt+de0=; b=iD30Tp/4l+qnAUoFhvQwr/kRwKyW8QNcgU42iwu4M1R0FqwPNi9oqj7rw8HYJEiiX2 iDz9FYddEY7lfnP3OZ9ZJCKCE2e92rb5o6DlyiNtqkQ3+Oatd3/B6DHJQTyCNZDrN9Ov wI03q4Jm2pOkskuBSoaslAFQ3GgMFx0dfk+8OR+rtqTZnCCKPr36jF4YBFft7duEU1VX y53Nr/5AVgkpX/CcBvaw3YVAStYDPr3ZsFFARIpHpFkQFRYpAnjGh4EyliAXl1siPJTD WzR1Aq+Zl1yRlLquwpA3oMcb5UMwgavKSkxEeUDvPvYH2B/Ojh4/JZIYNTtaCIa7uQ8Q SBsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si1189871pgv.738.2018.02.28.08.28.35; Wed, 28 Feb 2018 08:28:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935092AbeB1Q1e (ORCPT + 99 others); Wed, 28 Feb 2018 11:27:34 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35201 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934465AbeB1QPz (ORCPT ); Wed, 28 Feb 2018 11:15:55 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yr-0006Xb-8x; Wed, 28 Feb 2018 15:22:29 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000BL-Bo; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Wolfgang Grandegger" , "Marc Kleine-Budde" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 162/254] can: gs_usb: fix return value of the "set_bittiming" callback In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Wolfgang Grandegger 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 Signed-off-by: Marc Kleine-Budde Signed-off-by: Ben Hutchings --- 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)