All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: r8822be: remove some dead code
@ 2017-08-25  8:42 Dan Carpenter
  2017-08-25 13:50 ` Larry Finger
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-08-25  8:42 UTC (permalink / raw)
  To: kernel-janitors

"hdr" can't be NULL.  We take skb->data which is non-NULL and add an
offset to get "hdr".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/rtlwifi/rtl8822be/trx.c b/drivers/staging/rtlwifi/rtl8822be/trx.c
index 123e83bd6e82..38f80e48a399 100644
--- a/drivers/staging/rtlwifi/rtl8822be/trx.c
+++ b/drivers/staging/rtlwifi/rtl8822be/trx.c
@@ -279,13 +279,6 @@ bool rtl8822be_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *status,
 	 * to decrypt it
 	 */
 	if (status->decrypted) {
-		if (!hdr) {
-			WARN_ON_ONCE(true);
-			pr_err("decrypted is true but hdr NULL, from skb %p\n",
-			       rtl_get_hdr(skb));
-			return false;
-		}
-
 		if ((!_ieee80211_is_robust_mgmt_frame(hdr)) &&
 		    (ieee80211_has_protected(hdr->frame_control)))
 			rx_status->flag |= RX_FLAG_DECRYPTED;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: r8822be: remove some dead code
  2017-08-25  8:42 [PATCH] staging: r8822be: remove some dead code Dan Carpenter
@ 2017-08-25 13:50 ` Larry Finger
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2017-08-25 13:50 UTC (permalink / raw)
  To: kernel-janitors

On 08/25/2017 03:42 AM, Dan Carpenter wrote:
> "hdr" can't be NULL.  We take skb->data which is non-NULL and add an
> offset to get "hdr".
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks. Looks good.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-25 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25  8:42 [PATCH] staging: r8822be: remove some dead code Dan Carpenter
2017-08-25 13:50 ` Larry Finger

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.