Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2096890ybl; Thu, 30 Jan 2020 11:17:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwc3sjcNw+iIjh/BHF01fkoScFcp+s8Fj44lPvN13LFp3qr+/q9I9FuQQxICLNBPzFqWyA6 X-Received: by 2002:a05:6808:8cd:: with SMTP id k13mr3969114oij.4.1580411879690; Thu, 30 Jan 2020 11:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411879; cv=none; d=google.com; s=arc-20160816; b=IUMFwnrGJDRyh3tjOATRZ/PRI4ae0U4D18QRk5TKOk3E7gv9rPJU2SmxaGp06hzJO5 EFu3c2ugHjiGK+9m/22Wg94ptwD7WKlnGeI5MTbcccUNzyniNx8pLzPIdsR6AL660D2j U4a74NCk/N+OhB4dxLUSMzlms8mZLaUhrRML1McaVNcLma2nak9XsRjYpINKeEzVu540 ouIxzUcbeo0lntLvYpu84/RTGuXrBABHNF25c4Dpgb+xh6tYI/cZdgimRxFm9UxtdPb+ cIjYlYVvAV6RKMVXZT7yifzQQJ4F7PW2zVQbIK19H3Z+4Q6iB5trbps/6vlnl5XZ0/G+ Gkbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+U/q3cSZnNj0J2KpITZta+TGk1BL/YUY55Zq1fk8Qp4=; b=d4YdW49ZVuY1fYQ5t/aGa7vNaVvkPhdJreP0zkoLngxsbt/sruYqh/2V9T/VLor8Te JNiVm61XaQ7Rowu42MTheZXTezF15WtAQ2VwzQ6UroOdAgPOgnA18yteP3mk+BGZcybx GA+IicLdq6ib0XvsWFJ1LMOt5ShFrko8NM/KPfDuXnTpbfYF71Kr3bb5ztg4Hb4NIdFW XOT04lrnXKdaqqlgAU1h/cRDl+qFJ5XLcyLYKEhGqTUx4oYl9wZd2w3pCm+uH6O8EFfZ hJstvZe2HYSCj3F4JSxggAmydZ/Ubm1JS9agznfiRxN/fhy585tB06gpzuOqZsUz4AX3 a5HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IpNW0dbN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si3711214otq.250.2020.01.30.11.17.46; Thu, 30 Jan 2020 11:17:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IpNW0dbN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730764AbgA3SoF (ORCPT + 99 others); Thu, 30 Jan 2020 13:44:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:52974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730747AbgA3SoC (ORCPT ); Thu, 30 Jan 2020 13:44:02 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 39C362082E; Thu, 30 Jan 2020 18:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409841; bh=G4eHylNNoWcu/YjzldYF8NNdD8vwCF+1PoFgw3DSM/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IpNW0dbNamr2nmgO2eaBuFpr5ANuEXa6xVcTLAhkkidn5yldPx6OL41jhwxpT36y0 Snss2mZPUQeFjfFaC3ubp5Cm0wfetcU6JZJq/T59KCfTiSuBcZCQ6KRpCD+8MONv05 eCwaJYlzWyP5qCID9ZyvM4iDQC61lgB52DsIeIN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King Subject: [PATCH 5.4 013/110] staging: wlan-ng: ensure error return is actually returned Date: Thu, 30 Jan 2020 19:37:49 +0100 Message-Id: <20200130183616.003124505@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 upstream. Currently when the call to prism2sta_ifst fails a netdev_err error is reported, error return variable result is set to -1 but the function always returns 0 for success. Fix this by returning the error value in variable result rather than 0. Addresses-Coverity: ("Unused value") Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver") Signed-off-by: Colin Ian King Cc: stable Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -959,7 +959,7 @@ int prism2mgmt_flashdl_state(struct wlan } } - return 0; + return result; } /*----------------------------------------------------------------