Re: [PATCH v1 3/3] Bluetooth: btnxpuart: remove useless assignment

From: Francesco Dolcini
Date: Tue Nov 28 2023 - 02:31:23 EST


On Tue, Nov 28, 2023 at 06:26:56AM +0100, Jiri Slaby wrote:
> On 27. 11. 23, 20:14, Francesco Dolcini wrote:
> > From: Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx>
> >
> > Remove useless assignment of rx_skb to NULL in case the skb is in error,
> > this is already done in h4_recv_buf() that is executed a few lines
> > before.
>
> In case of error, nxpdev->rx_skb contains the error, not NULL, right?
correct.

The point is that we have

if (IS_ERR(skb))
skb = NULL;

at the beginning of h4_recv_buf(), that is called a few lines before,
making the assignment in btnxpuart.c redundant.

Francesco