Skip to content

Commit

Permalink
Revert "net: caif: replace BUG_ON with recovery code"
Browse files Browse the repository at this point in the history
This reverts commit c5dea81.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted.  It will be fixed up "correctly" in a
later kernel change.

The original change here was pointless as dev can never be NULL in this
function so the claim in the changelog that this "fixes" anything is
incorrect (also the developer forgot about panic_on_warn).  A follow-up
change will resolve this issue properly.

Cc: Aditya Pakki <[email protected]>
Cc: David S. Miller <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed May 13, 2021
1 parent bbeb18f commit 4df0704
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/caif/caif_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ser_device *ser;

if (WARN_ON(!dev))
return -EINVAL;

BUG_ON(dev == NULL);
ser = netdev_priv(dev);

/* Send flow off once, on high water mark */
Expand Down

0 comments on commit 4df0704

Please sign in to comment.