Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2364569pxv; Sat, 24 Jul 2021 13:57:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh9iC3gtFShtgrQKFqQMLOztDXgtxvzoc39Z+DDM37TxQT5vVB8vk+UqryVnJQ1OZiIQQx X-Received: by 2002:a05:6402:48f:: with SMTP id k15mr12709038edv.262.1627160268255; Sat, 24 Jul 2021 13:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627160268; cv=none; d=google.com; s=arc-20160816; b=NNJ59Zbj7mzygLKrjsq6znYPDoNq38r7E2IxHKjISXD9DboWRKMlpExJ0yprW1vNBC eicHyLve9Y1wDPCwtS5pDzprxUWIm8XVye492+jZKP3OGkj1HFCDtx++VkiJkd94h0we /LBu/fQnUmkicv5+Oic1fHWNkMYe/wkk6fd3d//WJFGmZ+BGsLXYHiRGnBaNx8eWDqWH IUlGyo4hZkk2TXwqvaKYHoAGB00mCgtdZb1HPBo2Sp2nacOPJJvkcGJtCbHf8Ri6UR1O puC/BhTdcXQhG5lKuhrjNoIL7Q/MTwk4ZYwro4v2tTveMK4/nNszfh82O57fJgjmugrg RWZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=6uCQCRQPCT19AFCHKSbasFjoqzaU46ALDrk/HwseUHg=; b=rWq3abQSlDsfFqmUc+eAFgOVyyKfDQBSY1WoTtv7k/tMP71NoFbNBPc8VCGpgabdek H+C2wcWANCBhiO7MWtiYB05S7RHh5UEIgRkfTR9KXQcoABj7fYYy2lBqtQUsjt4tcA8q 4U4L4HDtfSV4E5yP0/3NpkP2bBflOix3qb6WsSO1M1II+0c9qFsBdcHabSabnMM+SHTj HmDiJn36pd+Ut52VXTuh1BHVM6RBIKTQpeP4VkwanTqcd+z9rBA3vSLmz3jUSo1FmnUe dBkw252RPOHUUHOe7RUjb/IWwNWKYZSz2guk4eMyYB0cCHLaDMFqtEvH23mmLyPO5JrQ pwAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d6yJVNEy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c90si4257edf.274.2021.07.24.13.57.23; Sat, 24 Jul 2021 13:57:48 -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=@gmail.com header.s=20161025 header.b=d6yJVNEy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbhGXUPR (ORCPT + 99 others); Sat, 24 Jul 2021 16:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbhGXUPQ (ORCPT ); Sat, 24 Jul 2021 16:15:16 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9B07C061575 for ; Sat, 24 Jul 2021 13:55:47 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id hs23so8993617ejc.13 for ; Sat, 24 Jul 2021 13:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=6uCQCRQPCT19AFCHKSbasFjoqzaU46ALDrk/HwseUHg=; b=d6yJVNEypat1rndFBJKM+v3nmwf5LgBiY9J9EAAmJmBw8dCk87cUQ6CDMpwu6E1MEk byFxlzKDGImIzhWoOkjmih/B9MzEa1fy9cIq/NzoDk4apMOKzn8tKQ6SAi68Zcy99GYg CnmhgIealop1K18b7c0bnN8xUCt04pB66ldwZ1AtjaHo1esCpvaH4kcaxKTB2DJB2ID5 c0ln3RY/M41H67hbMm+OEQ2PsQabujMK4bMYJH3fuF0+8lJkfKjq3QYjzE0WAkecOFUr tHZH5lN3/mFmHYcyPdm7G3Qd4/0U1ZZdHoqqdHxYGN9PB+F0L3KSZgHHOM+z2u+QrWh7 heBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=6uCQCRQPCT19AFCHKSbasFjoqzaU46ALDrk/HwseUHg=; b=nSwfL92c6DawZVj43m9jscjMnfRB5FxU1YvbZuU29vObAvvKbHrRP4qitBYKf9dBjU OuLQuai/xRw+7U4eiHjIZk8sKcq/DFXrd7v+gtg7s0JNm67inMx0mOb7gC2KqFeW3Lm5 jOi82DcpAVI+SFtH2hvh963lRSHQIk863ZS72LCo0k/uel+FIWZQYmku0ewSpfbru11q UWA5MX8ADvR98mw3gK0QI1ORKAggP1TcATUH6Z/zNF5/dVngFrdjJyq5kQwPdCFqVL2G bauUhoXypdzZgaUVAhl8C4GELbMsIeMeCsBB6YyS4SpNuW7lcVARBja6pzZOeQGRP8ft 6+QA== X-Gm-Message-State: AOAM533DSKUQMD3D5ZqJBEIog1Qsl1a/T+EZqvNCA8q6pZvzn3ry+py+ vRXvxryFqcJt9sICGxYWGSY= X-Received: by 2002:a17:906:cb8b:: with SMTP id mf11mr10382461ejb.297.1627160146271; Sat, 24 Jul 2021 13:55:46 -0700 (PDT) Received: from pc ([196.235.233.206]) by smtp.gmail.com with ESMTPSA id x13sm14569817edv.40.2021.07.24.13.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 13:55:45 -0700 (PDT) Date: Sat, 24 Jul 2021 21:55:42 +0100 From: Salah Triki To: Greg Kroah-Hartman , Fabio Aiuto , Ross Schmidt , Marco Cesati , Brother Matthew De Angelis , "Gustavo A. R. Silva" , Ivan Safonov Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] tablet: acecad: update the reference count of the usb interface structure Message-ID: <20210724205542.GA549014@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use usb_get_intf() and usb_put_intf() in order to update the reference count of the usb interface structure. Signed-off-by: Salah Triki --- 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) @@ -236,6 +236,9 @@ static void usb_acecad_disconnect(struct usb_interface *intf) input_unregister_device(acecad->input); usb_free_urb(acecad->irq); usb_free_coherent(udev, 8, acecad->data, acecad->data_dma); + + usb_put_intf(acecad->intf); + kfree(acecad); } -- 2.25.1