All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 04/12] staging: rtl8188eu: replace switch-case with if
Date: Thu,  8 Apr 2021 21:55:53 +0200	[thread overview]
Message-ID: <20210408195601.4762-4-martin@kaiser.cx> (raw)
In-Reply-To: <20210408195601.4762-1-martin@kaiser.cx>

This switch has only one case. Replace it with an if statement.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 56ba0b8a4c87..e8222ffb6fea 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -675,13 +675,9 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, struct xmit_buf
 			 ("%s(): usb_submit_urb, status =%x\n",
 			  __func__, status));
 
-		switch (status) {
-		case -ENODEV:
+		if (status == -ENODEV)
 			padapter->bDriverStopped = true;
-			break;
-		default:
-			break;
-		}
+
 		goto exit;
 	}
 
-- 
2.20.1


  parent reply	other threads:[~2021-04-08 19:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 19:55 [PATCH 01/12] staging: rtl8188eu: remove the last urb callback macros Martin Kaiser
2021-04-08 19:55 ` [PATCH 02/12] staging: rtl8188eu: remove prototype for non-existing function Martin Kaiser
2021-04-08 19:55 ` [PATCH 03/12] staging: rtl8188eu: make ffaddr2pipehdl static Martin Kaiser
2021-04-08 19:55 ` Martin Kaiser [this message]
2021-04-08 19:55 ` [PATCH 05/12] staging: rtl8188eu: remove unused function parameter Martin Kaiser
2021-04-08 19:55 ` [PATCH 06/12] staging: rtl8188eu: remove a constant variable Martin Kaiser
2021-04-08 19:55 ` [PATCH 07/12] staging: rtl8188eu: move static array from .h to .c Martin Kaiser
2021-04-08 19:55 ` [PATCH 08/12] staging: rtl8188eu: move another " Martin Kaiser
2021-04-08 19:55 ` [PATCH 09/12] staging: rtl8188eu: always free cmd_obj in the cmd thread Martin Kaiser
2021-04-08 19:55 ` [PATCH 10/12] staging: rtl8188eu: remove duplicate if statement Martin Kaiser
2021-04-08 19:56 ` [PATCH 11/12] staging: rtl8188eu: remove a dead assignment Martin Kaiser
2021-04-08 19:56 ` [PATCH 12/12] staging: rtl8188eu: simplify rtw_cmd_thread's main loop Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408195601.4762-4-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.