From patchwork Mon Oct 19 15:15:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 7438051 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 2F3779F36A for ; Mon, 19 Oct 2015 15:30:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 575052078F for ; Mon, 19 Oct 2015 15:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B8E4206D7 for ; Mon, 19 Oct 2015 15:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753643AbbJSPaT (ORCPT ); Mon, 19 Oct 2015 11:30:19 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:47048 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754416AbbJSPaQ (ORCPT ); Mon, 19 Oct 2015 11:30:16 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1ZoCO1-0002o1-Pw; Mon, 19 Oct 2015 11:30:09 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.2/8.14.6) with ESMTP id t9JFF7Hm022096; Mon, 19 Oct 2015 11:15:07 -0400 Received: (from linville@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id t9JFF6fB022068; Mon, 19 Oct 2015 11:15:06 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: Kalle Valo , RUC_Soft_Sec , "John W. Linville" Subject: [PATCH] orinoco_usb: return error in ezusb_probe when alloc_orinocodev fails Date: Mon, 19 Oct 2015 11:15:00 -0400 Message-Id: <1445267700-21554-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 2.4.3 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 The current code exits after alloc_orinocodev, but fails to change the return value to something that indicates the failure. This patch changes the return value to -ENOMEM. https://bugzilla.kernel.org/show_bug.cgi?id=106181 Signed-off-by: John W. Linville --- drivers/net/wireless/orinoco/orinoco_usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c index 26a57d773d30..f2cd513d54b2 100644 --- a/drivers/net/wireless/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/orinoco/orinoco_usb.c @@ -1576,6 +1576,7 @@ static int ezusb_probe(struct usb_interface *interface, ezusb_hard_reset, NULL); if (!priv) { err("Couldn't allocate orinocodev"); + retval = -ENOMEM; goto exit; }