Commit 21a8a77a authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Jakub Kicinski
Browse files

nfc: st21nfca: Drop unneeded null check in st21nfca_tx_work()



Variable 'info' is obtained via container_of() of struct work_struct, so
it cannot be NULL.  Simplify the code and solve Smatch warning:

  drivers/nfc/st21nfca/dep.c:119 st21nfca_tx_work() warn: can 'info' even be NULL?

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250104142043.116045-1-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3c89a986
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@ static void st21nfca_tx_work(struct work_struct *work)
	struct nfc_dev *dev;
	struct sk_buff *skb;

	if (info) {
	dev = info->hdev->ndev;
	skb = info->dep_info.tx_pending;

@@ -128,7 +127,6 @@ static void st21nfca_tx_work(struct work_struct *work)
	device_unlock(&dev->dev);
	kfree_skb(skb);
}
}

static void st21nfca_im_send_pdu(struct st21nfca_hci_info *info,
						struct sk_buff *skb)