From patchwork Sat Aug 17 21:36:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2846054 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B77ABF546 for ; Sat, 17 Aug 2013 21:36:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BE34201EA for ; Sat, 17 Aug 2013 21:36:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2AC0201E9 for ; Sat, 17 Aug 2013 21:36:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754710Ab3HQVge (ORCPT ); Sat, 17 Aug 2013 17:36:34 -0400 Received: from mail-yh0-f53.google.com ([209.85.213.53]:34947 "EHLO mail-yh0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754427Ab3HQVgd (ORCPT ); Sat, 17 Aug 2013 17:36:33 -0400 Received: by mail-yh0-f53.google.com with SMTP id b6so514117yha.40 for ; Sat, 17 Aug 2013 14:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=e5UXhHD5XDBNyWTaKfWcDm/xYnSu1QetgT/8V8oFWbk=; b=tGQ/AxqczcvxkuFO51fq4ToOgGI/ZZqlfYQJRhrBStyCo8wy41eAHBsryarTHsp8sQ PGbB+d47kvQEs8bkH75HWjRNuznENKYoN0cg0znYKZSGaoVLIlnUqPC84w5ovHdJKxd6 b1HYWpasdeo+wej/PWtTnrKEVvwTAwSBN6wWkF1Gw40hko8m8hp+N//LvKcu2hjyONE+ J9J48WbrBCAXWr6cs/ECiEv2nqbJuQeUlOfZ0ubrmnpCe4j/tfaE5bZwvm6NgAsfgRgo 4zNBLsz8X5Pp2dkl6I1lcfeHfAIMmYqWkYJijrbb46V03qb7eCbDyeKxYKcWT0P7LVr8 ObTQ== X-Received: by 10.236.200.66 with SMTP id y42mr5271665yhn.45.1376775392776; Sat, 17 Aug 2013 14:36:32 -0700 (PDT) Received: from localhost.localdomain ([189.5.16.50]) by mx.google.com with ESMTPSA id v23sm5078735yhv.1.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Aug 2013 14:36:32 -0700 (PDT) From: Fabio Estevam To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Fabio Estevam Subject: [PATCH] net: rfkill: Check the return value of regulator_enable() Date: Sat, 17 Aug 2013 18:36:07 -0300 Message-Id: <1376775367-17068-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Fabio Estevam Fix the following build warning: net/rfkill/rfkill-regulator.c:43:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Fabio Estevam --- net/rfkill/rfkill-regulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/rfkill/rfkill-regulator.c b/net/rfkill/rfkill-regulator.c index d11ac79..0aa922c 100644 --- a/net/rfkill/rfkill-regulator.c +++ b/net/rfkill/rfkill-regulator.c @@ -30,6 +30,7 @@ struct rfkill_regulator_data { static int rfkill_regulator_set_block(void *data, bool blocked) { struct rfkill_regulator_data *rfkill_data = data; + int ret; pr_debug("%s: blocked: %d\n", __func__, blocked); @@ -40,7 +41,9 @@ static int rfkill_regulator_set_block(void *data, bool blocked) } } else { if (!rfkill_data->reg_enabled) { - regulator_enable(rfkill_data->vcc); + ret = regulator_enable(rfkill_data->vcc); + if (ret) + return ret; rfkill_data->reg_enabled = true; } }