Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2296259pxv; Sat, 24 Jul 2021 11:23:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhN+jHtcoR//R897Pr+CqqkXxntGmOCpyKk1U0NESVkeRWUd6TP11DNjwTkfTokEJBFkTv X-Received: by 2002:a05:6638:2516:: with SMTP id v22mr9275288jat.144.1627150988387; Sat, 24 Jul 2021 11:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627150988; cv=none; d=google.com; s=arc-20160816; b=fKnUv5bn+SMi7OwUjrIHh1MB3QoXBeXU+b9TAzeWAztFjjZN8RWaFOXZGtp4FKS23H eyol6qQjx3qwVxYaLHruBxdq6PkPLjMsXok/5ehGtyD/BsbAsQty3bry2B3ksTsR0EmN IlTbY7qeSaaMSiXqWBj02Lq95hE3sjJAvdtUZhCQPF0nmg7DvJBAk+AabCoVJvKZ/cvS P7a1I4pBBpohrO/xrDVLlQ12HflMH5YXUU8Wg/0vPy1PYqmtyLnrLk9TWRYE94Uz4Xz7 /Q/mGPug2wlhD1VzxAhksxY/iIQWnzGkk4vstz0QRZIOLPgYhV/2hJ8iiTbLo/bxLeOE MUaQ== 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=VoDoE+K4ajdEkrYCeli3UDgiK2FyXtPR8yc3ofmqbUs=; b=mwENCUMvrnsrDf1U5pvVmSB+I5zIjIwxsm3aqzJIlnodIbUFyY1Wbo/0a5uQs4UPuq gRbMdwmKjtHOeS45xqPgHKpVVV5qmKkTxFacIYfn1/dpuKf+h9NAGswMeVvmsxue77z0 3N4dEUsq6l19OVlZBUwTadtzeXTttO4kHI2PO1keErrz6fQFkVoov7Nn7OcZD+E2jQDs NN4d5A35V4jpIwURGY5BccjxQDemomzVgbaNi+QNEmXAxRpclqK34CG+zHJ8vZr9ELAd ttYCyX5ka77uALhfWUCyFp7sEZklz3fLVXlT3H3WwuA/p2ClfLeIbAJprw1G4FRcIHUK LBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h8QhkqXr; 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 j8si28847337ilq.125.2021.07.24.11.22.56; Sat, 24 Jul 2021 11:23:08 -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=h8QhkqXr; 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 S229811AbhGXRkq (ORCPT + 99 others); Sat, 24 Jul 2021 13:40:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbhGXRk2 (ORCPT ); Sat, 24 Jul 2021 13:40:28 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AE62C061575; Sat, 24 Jul 2021 11:20:59 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id gt31so8591364ejc.12; Sat, 24 Jul 2021 11:20:59 -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=VoDoE+K4ajdEkrYCeli3UDgiK2FyXtPR8yc3ofmqbUs=; b=h8QhkqXrf5WnnGU62G8nHUllnOhFHS7kSg7tHJfGAVvQfiISrBOvWRv9B6cc6Z+1XI ks2WUL1pUbuM6UiG9zjepo0XQHPy78Fz9hHKa3vRIT6Ds7QQeap1hyVBcW0aOT8g/QXi wGtMRqNQ+yxjxhc78SP/46YFDSw5lZF6ZD49Oe48udZmvSZvk7SV5gjHXLYB7VjRga1C q2sp0n6d5RZIxXPz7qQOlIaQTSFHk/4iYdFk/b5lWk8Y3gz1OPYXf6hSoXkaR5LDtcZk g3BTWX7N+Hp4Osi9eoMWYLVbuYpN5zBWpENr+gzA3EFegjFZAspsr31FSfyPn0KmCWww C2nA== 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=VoDoE+K4ajdEkrYCeli3UDgiK2FyXtPR8yc3ofmqbUs=; b=hpYJvIW9mxeualFZpYrzbt1msFxBa9V9hkStBC4uBh/wwdRYFsa+2aY6GbkV8R0zzz 49QaQKeuL3FdvJeqNxy8VLTUpWlgiO8c9oGxh4wy78mtI09FhEhGKrVpu/VA2XrAsSRU 8lPicN/Wv60uBv+cXzBh2T4KrXbEN0230WLCSr68xQk90YLC5sj1BGjYg6C/xBFXxc4k NxFIbXjZJ9Ljy8Ndo5XDFFh4IfM8vQog/L+IigL6kfpj6aY3c4llZ6Mq/qe01GEnbe+l +TfiLLQH4x3Jm1C/V2mvv1OxBXxp/3xXqphCnquSpSGmzUQIm7Di2jdYHr2T2oMpcg2p 7SvQ== X-Gm-Message-State: AOAM530/bgw5+MLEBAWZxgToeERPaes+QGbymfAHJ7Dz8rgBgTzGtyYD yTJ2VqaYr+GKaNtdq+mJPJU1evKVpAo= X-Received: by 2002:a17:906:f6d5:: with SMTP id jo21mr9870816ejb.444.1627150857771; Sat, 24 Jul 2021 11:20:57 -0700 (PDT) Received: from pc ([196.235.233.206]) by smtp.gmail.com with ESMTPSA id k1sm12652835eji.84.2021.07.24.11.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 11:20:57 -0700 (PDT) Date: Sat, 24 Jul 2021 19:20:54 +0100 From: Salah Triki To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , gregkh@linuxfoundation.org Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bluetooth: bcm203x: update the reference count of udev Message-ID: <20210724182054.GA451351@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_dev() and usb_put_dev() in order to update the reference count of udev. Signed-off-by: Salah Triki --- drivers/bluetooth/bcm203x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index e667933c3d70..547d35425d70 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c @@ -166,7 +166,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id if (!data) return -ENOMEM; - data->udev = udev; + data->udev = usb_get_dev(udev); data->state = BCM203X_LOAD_MINIDRV; data->urb = usb_alloc_urb(0, GFP_KERNEL); @@ -244,6 +244,8 @@ static void bcm203x_disconnect(struct usb_interface *intf) usb_set_intfdata(intf, NULL); + usb_put_dev(data->udev); + usb_free_urb(data->urb); kfree(data->fw_data); kfree(data->buffer); -- 2.25.1