From patchwork Sat Feb 20 22:30:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Khoroshilov X-Patchwork-Id: 8367981 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A54689F52D for ; Sat, 20 Feb 2016 22:31:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD1B42021A for ; Sat, 20 Feb 2016 22:31:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5CDA201EF for ; Sat, 20 Feb 2016 22:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948892AbcBTWbO (ORCPT ); Sat, 20 Feb 2016 17:31:14 -0500 Received: from mail.ispras.ru ([83.149.199.45]:58301 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947588AbcBTWbE (ORCPT ); Sat, 20 Feb 2016 17:31:04 -0500 Received: from localhost.localdomain (ppp83-237-27-166.pppoe.mtu-net.ru [83.237.27.166]) by mail.ispras.ru (Postfix) with ESMTPSA id B51FE54006E; Sun, 21 Feb 2016 01:31:02 +0300 (MSK) From: Alexey Khoroshilov To: Kalle Valo Cc: Alexey Khoroshilov , Andrea Merello , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe() Date: Sun, 21 Feb 2016 01:30:29 +0300 Message-Id: <1456007429-4713-2-git-send-email-khoroshilov@ispras.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456007429-4713-1-git-send-email-khoroshilov@ispras.ru> References: <1456007429-4713-1-git-send-email-khoroshilov@ispras.ru> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need in usb_put_dev() if at76_load_internal_fw() succeed. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/wireless/atmel/at76c50x-usb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index dab25136214a..1efb1d66e0b7 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -2481,9 +2481,7 @@ static int at76_probe(struct usb_interface *interface, dev_err(&interface->dev, "error %d downloading internal firmware\n", ret); - goto exit; } - usb_put_dev(udev); goto exit; }