Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2604152pxv; Sat, 24 Jul 2021 23:33:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXa6t3hrnO3cbWzB2YRVDKBDZD/9LOFhLt1LoS07RlpUstVpbnyDkcq6FrlcUYw9YvIczG X-Received: by 2002:a05:6e02:1d8d:: with SMTP id h13mr8746670ila.40.1627194824784; Sat, 24 Jul 2021 23:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627194824; cv=none; d=google.com; s=arc-20160816; b=KNG5spNNe0SJ/jypACZ/7nhY7oxRNVvkdS5XRlarslzrBuKQTIF49OAf/qBpRwBTL1 RSyJ3biXVR1xZMPAdXPf56J3PUUrNJTto+ljXtd0HExhHF1d2+nGKM++bJqFYp8D5/Qr cABD+ncwsDduSrZzfTKRHwYmLfghptmGKYCufMv4EeYTy+mx3zcZD/7RqGRQQW6O2mbu 14+kfhawmEYq0FQKkl0978YSa5LC8lKJRX4nJ5wG5Wj9I4rMwF5bwnvdVytsLflAS6UD zKY8vC9gEPAARFW0b6PwbrS4p/+4DjR/y8Um9xdJ2Sr0v6HwfzEpR7qH2V1MdmsP9TM/ rtLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=deYpjdj6eU+NK1DSpvLOjkcSSi6m8z5ZW1IpuqyGAi0=; b=YJ8/t9AN5lnph2o7vDHapPmOMLcLDW0Om7An6lsNGVp0YhhJUTUBuEtv4IGzZdQIby IHQo9mzKKdTwBTz2TOasoROzQdhrkpimQtxf84dcIcu4QSG+NTRvWee6y8wFDsPHNB/q OBwQAM/iETcFt0wvFYPHqWHgeZJ+HMANwqV5TC6N+1xpppBI1x4ncFStbSBsXmOcabTd +0Rrz1sgVoZ73+pyJTL7VN0xZx0THLu+9ExcT9qT2MnWJ/N/Hrly1g8k46YSB0Db5e3U ihp1NV4Iz+ofedfToh/OTsSm987aQKje3Pis31ta6y+WAB8nQ+2t7mkoMoHET4SVORVY Tn7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ArE/gUCU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si40911749jav.53.2021.07.24.23.33.21; Sat, 24 Jul 2021 23:33:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ArE/gUCU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbhGYFv3 (ORCPT + 99 others); Sun, 25 Jul 2021 01:51:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:43260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbhGYFvU (ORCPT ); Sun, 25 Jul 2021 01:51:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C3C9606A5; Sun, 25 Jul 2021 06:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627194711; bh=z8A61fpG10Pxn3NAU3x0FR0SgdZ2yY3pLNSvKShSQfE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ArE/gUCUU1jIeZ5Ohfz+FYcURtlnlCUl7hKyPYQEZo6miCsyYSw60jVGoSjjrRjGf AbwWVZd214edmKIiiIh11jZC/1Kk1c6i0AlwIowra1MkkD+wlTr0wkHMzAL45FZDw/ bUs/O1/yOOHKs3dtgvC0URZrdDihdO28bZeE4AdI= Date: Sun, 25 Jul 2021 08:31:47 +0200 From: Greg KH To: Salah Triki Cc: Marcus Folkesson , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] input: joystick: pxrc: use usb_get_intf() Message-ID: References: <20210724213617.GA586795@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210724213617.GA586795@pc> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 24, 2021 at 10:36:17PM +0100, Salah Triki wrote: > Use usb_get_intf() in order to increment reference count of the usb > interface structure. > > Signed-off-by: Salah Triki > --- > drivers/input/joystick/pxrc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/joystick/pxrc.c b/drivers/input/joystick/pxrc.c > index ea2bf5951d67..59304352548b 100644 > --- a/drivers/input/joystick/pxrc.c > +++ b/drivers/input/joystick/pxrc.c > @@ -143,7 +143,7 @@ static int pxrc_probe(struct usb_interface *intf, > return -ENOMEM; > > mutex_init(&pxrc->pm_mutex); > - pxrc->intf = intf; > + pxrc->intf = usb_get_intf(intf); > > usb_set_intfdata(pxrc->intf, pxrc); > > -- You can not add a reference and never drop it :(