Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp68849pxt; Wed, 4 Aug 2021 06:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/7ROlu+8a8rnFqGZdKSaAbvKTfbe0bzMW87f4rifbcXAFcCsJQx+uP5XIKY+GHW0QIdgM X-Received: by 2002:a05:6402:747:: with SMTP id p7mr32498412edy.114.1628082628223; Wed, 04 Aug 2021 06:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628082628; cv=none; d=google.com; s=arc-20160816; b=LdWS7+uHajQf0LVPPNzLBuoA2VGliQfOc9jQi5pHqpzOBgq6BOC0ayykV0v8HjLEbd ZTZnjSQUP6tC6qajFOJQRiyzaLJoW13vjiaQc7A1r5KPuc58l3JrOXQWX02v6w94BvrC W656FyS+1oLxZAWb8eOx+DRBbcsxLAZ+OkeQt1tIOeLL9fbHL1Tc8WT0uzfHBCFjivfq IgJtJCcNpkvtHv8sbP0cde1cDk9OQBcgABqReLa8Ord+BjYh6C+fHQwL4LwqJIDAfPmq oO9/XP5C4dIPwwo9QB9oppRDH6rV6XXDkiONGMjElrDSVMFSndecgjQ5GXaeQtzmv8bJ 4VTA== 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:to:from:date:dkim-signature; bh=+Vgww6tDeIA0N81ghF7MoDIb8YTTuEWFQttkTJSn3Ng=; b=UfJJrup2RPhT4NltISIFzIvdg0bjnYU3N9w3SWvqZeUc2AxSRIvTUqz8G16IrrwIQ/ 0xJzx9HMvUSZI8iH/l0l9LNJXLxLnyl2blPexG0MSAuo8uPjjI2xQyMo30hKc6qDMfoA 7ACvb8sA0vpK7kqRbxUKmxG0H+ov7JR4SGE5/tQqS6hsa6fWXWw/Tn/mmk4/GVIB/yYq o3jOZtuJVzw81bTVDWIM3cF2uvvaEPN3hbUT+gibUwcze7W35CSFY3M96lSw7xG/cz/W vNlTJpevrJuKnRT4+rtBhCfH4Lneztk0nPM07rkODY6MSgXnSSNTOa4fkN3dHQT0M15Y TdDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jJ8mkuR3; 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 w2si2188731edc.230.2021.08.04.06.10.01; Wed, 04 Aug 2021 06:10:28 -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=jJ8mkuR3; 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 S237188AbhHDMDQ (ORCPT + 99 others); Wed, 4 Aug 2021 08:03:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:54942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237148AbhHDMDP (ORCPT ); Wed, 4 Aug 2021 08:03:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5852A60F22; Wed, 4 Aug 2021 12:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628078582; bh=tgNOdqKx8V6QH+68UnW8H7w3PF0OXwRdh17tL2J0lI4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=jJ8mkuR3a/L15l+BrLwwYhROuzmLkYaIb59uUY8GuW70X5+5qaTy+HNWxZWlWsiaV RL3C/ExqI64NQLUzoEap/qfohCT7jEOQbifJc+/zuk1xwNJ8rnyDqrrC7B/Ib789vu 9sm6Oue0MbCdVTpPgdg1tNPu4+zUI2DMshPp6T78= Date: Wed, 4 Aug 2021 14:03:00 +0200 From: Greg Kroah-Hartman To: Dan Carpenter , Salah Triki , Fabio Aiuto , Ross Schmidt , Marco Cesati , Brother Matthew De Angelis , "Gustavo A. R. Silva" , Ivan Safonov , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tablet: acecad: update the reference count of the usb interface structure Message-ID: References: <20210731160938.GA909566@pc> <20210804105838.GE1931@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210804105838.GE1931@kadam> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021 at 01:58:38PM +0300, Dan Carpenter wrote: > On Sat, Jul 31, 2021 at 05:09:38PM +0100, Salah Triki wrote: > > drivers/input/tablet/acecad.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c > > index a38d1fe97334..85fe134a30ee 100644 > > --- a/drivers/input/tablet/acecad.c > > +++ b/drivers/input/tablet/acecad.c > > @@ -151,7 +151,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ > > goto fail2; > > } > > > > - acecad->intf = intf; > > + acecad->intf = usb_get_intf(intf); > > acecad->input = input_dev; > > > > if (dev->manufacturer) > > As I mentioned earlier, you need to drop the reference if > input_register_device() fails. Also as mentioned in other threads, this is not needed at all.