From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28370C433DB for ; Thu, 14 Jan 2021 09:06:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2433221E2 for ; Thu, 14 Jan 2021 09:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727349AbhANJGV (ORCPT ); Thu, 14 Jan 2021 04:06:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:43110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbhANJGU (ORCPT ); Thu, 14 Jan 2021 04:06:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B39D8221E2; Thu, 14 Jan 2021 09:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610615140; bh=qDLAwr206zXZGSraoMYhwbCT8GXAxyVUGRS5xaVvuCs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D8nfgL2RYDjxvaiOr+aBNxixlWHMIzKz88eFYWFcrnGOofzWISWWWy34X/OLkS4Ko GbGIju3ZfNsq7Q4ymiYpPiM7TSD7R2s63diJ0qgEB6bWniRowRgADpoD/IKFhCAHTB aDfe3E1nxWIYwk6sUpOlzOIyX9DF8DyJzui5wbZs= Date: Thu, 14 Jan 2021 10:06:45 +0100 From: Greg Kroah-Hartman To: Andy Shevchenko Cc: "Ahmed S. Darwish" , Thinh Nguyen , Felipe Balbi , "linux-usb@vger.kernel.org" , Peter Chen , Lee Jones , Alan Stern , Dejin Zheng , Sebastian Andrzej Siewior , Michal Nazarewicz , "stable@vger.kernel.org" Subject: Re: [PATCH v2] usb: udc: core: Use lock when write to soft_connect Message-ID: References: <311bc6d30b23427420133602c2833308310b7fcb.1610595364.git.Thinh.Nguyen@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Jan 14, 2021 at 09:03:53AM +0200, Andy Shevchenko wrote: > On Thursday, January 14, 2021, Ahmed S. Darwish > wrote: > > > On Wed, Jan 13, 2021 at 07:38:28PM -0800, Thinh Nguyen wrote: > > ... > > > @@ -1543,10 +1546,12 @@ static ssize_t soft_connect_store(struct device > > *dev, > > > usb_gadget_udc_stop(udc); > > > } else { > > > dev_err(dev, "unsupported command '%s'\n", buf); > > > - return -EINVAL; > > > + ret = -EINVAL; > > > } > > > > > > - return n; > > > > Should be ret = n; here. Why? That happened higher up in the patch. thanks, greg k-h