Commit 1de8eec7 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

staging: wfx: remove duplicated code in wfx_cmd_send()



The code to execute on end of the function is the same whatever the
command replies or not.

Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220225112405.355599-8-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a564d55a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -74,9 +74,8 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request,
	if (no_reply) {
		/* Chip won't reply. Give enough time to the wq to send the buffer. */
		msleep(100);
		wdev->hif_cmd.buf_send = NULL;
		mutex_unlock(&wdev->hif_cmd.lock);
		return 0;
		ret = 0;
		goto end;
	}

	if (wdev->poll_irq)
@@ -98,6 +97,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request,
		ret = wdev->hif_cmd.ret;
	}

end:
	wdev->hif_cmd.buf_send = NULL;
	mutex_unlock(&wdev->hif_cmd.lock);