Message ID | 20241007161035.1205516-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e14edcbe88bac39e7515f132c9be50a916bc020b |
Headers | show |
Series | [next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Mon, 7 Oct 2024 17:10:35 +0100 you wrote: > The variable ret is being assigned -ENOMEM however this is never > read and it is being re-assigned a new value when the code jumps > to label resubmit. The assignment is redundant and can be removed. > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> > --- > drivers/bluetooth/btintel_pcie.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Here is the summary with links: - [next] Bluetooth: btintel_pcie: remove redundant assignment to variable ret https://git.kernel.org/bluetooth/bluetooth-next/c/e14edcbe88ba You are awesome, thank you!
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index 5252125b003f..2c5d1edf1919 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -516,10 +516,8 @@ static int btintel_pcie_submit_rx_work(struct btintel_pcie_data *data, u8 status buf += sizeof(*rfh_hdr); skb = alloc_skb(len, GFP_ATOMIC); - if (!skb) { - ret = -ENOMEM; + if (!skb) goto resubmit; - } skb_put_data(skb, buf, len); skb_queue_tail(&data->rx_skb_q, skb);
The variable ret is being assigned -ENOMEM however this is never read and it is being re-assigned a new value when the code jumps to label resubmit. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> --- drivers/bluetooth/btintel_pcie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)