Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1423210pxb; Fri, 20 Aug 2021 05:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuEK8tjn7C7H8hOleaa63lKbk6enN/Kdfrod+KQOt7+yajAbfRgOPRjWAfjlrWOE+uNl+Z X-Received: by 2002:a05:6602:2595:: with SMTP id p21mr15729264ioo.51.1629462260921; Fri, 20 Aug 2021 05:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629462260; cv=none; d=google.com; s=arc-20160816; b=QMEj/C1hE/I8mcLPwYREBIrcAK6YfHQaPIH9ab6BHSoE4oHB4LnkZeoRcQpmH0ovBa imhZpdgPd3l01Fsz7RAm29MhXz2MOTzshKEG0GBqeLK1gCLlwWxBi++qmGixkQ4gi7oo n2znd+Df35QnboYSZv16Z8PjoX5+bPpFzszauQccjOXHIV/goaCq6o5rg6GRar4uPMV2 LkDP7fGK/ym/AV9PjPLFpaejPbrqCy7A3B61NI4exLtCWj0sckrjaBHXcYPHEiM3MTHr LME6yoayJwtKRjESu4SQWrwjttMs9MTcNR0wQN323tb5LvVpG04VdBFoFQYt/Tu/lp4v oQjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=41wZNu+BhPGxufqxboiTWOQUCWdCALXqeh0CNc/WWXg=; b=ajUGAw70MN8FqSBTXs+xlSbBZ7oXs/mZmriamP8EDTseWpwnK4CMC8eSeogQpFylwv G5cfSBi+NBVDEKbAMby0/Wj9nDJACIdzc+gdUZCxo7T0nnSJ214FvuD+IrVu3eh2lw8G eEH21gyvq6srFnGzPrbYEIngYb8ukq3HXdHksD/tw6+YNvelWlDc24JfnuJ7XWwSUlPs 5RF8PnRgKT2OJGhxzrJeZeKGXoStyaKd9gvwaZJXur3zrJpIuyM7b3OvFrlf1CrEjzWJ bM/bLSnxx7gKR6ERRhVqyCTK7N/JWKj01du68QYBPOlkC2YdCSkw9slQCrq0LHT9U+xF epWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QquzbTa2; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si8151471ile.29.2021.08.20.05.24.09; Fri, 20 Aug 2021 05:24:20 -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=@kernel.org header.s=k20201202 header.b=QquzbTa2; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240285AbhHTMXk (ORCPT + 99 others); Fri, 20 Aug 2021 08:23:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:34720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237882AbhHTMXj (ORCPT ); Fri, 20 Aug 2021 08:23:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 07C7060FE6; Fri, 20 Aug 2021 12:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629462182; bh=5S9q4nhazyBUfMjB1XZTApAg3QkJ9BP0SSfP8zlmtxs=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=QquzbTa2B8N8G+GJAgVn2W6BmTyAaxDmBZ/IjULhlpz+r2wiWof/gO302DoumfQur MDzVixcxcfxONcyaBsnEAd0HlcwU5dGAzsVlGgj4SFXnGtC9Zu7wZb/oOlZUZn0yHg tYV+kTE5U0GBVCYS/Yrf4YxiZciljVYG4GOymwXGggas5GwiJH7LQnYPgwU8gAAxSL BxHJZ5PwZbDVw1MtJIjorUE3qdQOPIfPlXMuISz0GTjG17RH1NpRMEJ6b1SZ8UZ1/E hgtWRszU3Y2fdk0yR/0e+4hAUwoRvwyX+5Nx9JqstM3hHO37bYg/AiUCd47bWdMTP+ QApZ5jNZBNcjg== Date: Fri, 20 Aug 2021 14:22:59 +0200 (CEST) From: Jiri Kosina To: Salah Triki cc: Benjamin Tissoires , gregkh@linuxfoundation.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND v2] hid-elo: update the reference count of the usb device structure In-Reply-To: <20210729004451.GA783805@pc> Message-ID: References: <20210729004451.GA783805@pc> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Jul 2021, Salah Triki wrote: > Use usb_get_dev() to increment the reference count of the usb device > structure in order to avoid releasing the structure while it is still in > use. And use usb_put_dev() to decrement the reference count and thus, > when it will be equal to 0 the structure will be released. Applied, thanks for spotting this. -- Jiri Kosina SUSE Labs