From patchwork Thu Nov 12 02:35:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7599151 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 88AC79F392 for ; Thu, 12 Nov 2015 02:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A539120814 for ; Thu, 12 Nov 2015 02:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4401A20810 for ; Thu, 12 Nov 2015 02:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbbKLCcO (ORCPT ); Wed, 11 Nov 2015 21:32:14 -0500 Received: from eusmtp01.atmel.com ([212.144.249.243]:43162 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbbKLCcN (ORCPT ); Wed, 11 Nov 2015 21:32:13 -0500 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Thu, 12 Nov 2015 03:32:05 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH] staging: wilc1000: fix bug in sdio/spi Date: Thu, 12 Nov 2015 11:35:26 +0900 Message-ID: <1447295726-24486-1-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 sdio_init and wilc_spi_init always return error, so it fails everytime. Fix this by removing else statement. This fixes c1af9db78950a778ec18343c5c5a6d4cfbf58a61, bacd388547f55eb415ce266c8723cc6f1281a25d Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_sdio.c | 2 -- drivers/staging/wilc1000/wilc_spi.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 8aacf55..1addc56 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -564,8 +564,6 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func) if (!linux_sdio_init()) { g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed io init bus...\n"); return 0; - } else { - return 0; } /** diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 3741836..cff61fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -968,8 +968,6 @@ static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func) if (!linux_spi_init()) { PRINT_ER("[wilc spi]: Failed io init bus...\n"); return 0; - } else { - return 0; } /**