From nobody Thu Feb 12 21:47:13 2026 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DBFE1865E9 for ; Sat, 4 Jan 2025 14:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000450; cv=none; b=ReAdKfDZs0B9a94EHADOtLOH75eDix6sHHZeqcmckbHZ5a3kPPjQoSb6CURWJyoraAglGqNfSqglfLGQpEcWcoMgkJZXMS6qdvBLwntH6x4Hn6i/D2Em5euIFgEI+1Df93gWGFweZ2eHqyAgmoRJnPlA7uPZ7PxmxSIBhx0EDI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000450; c=relaxed/simple; bh=eVgs3PCXqky4uyt6ABNBEGXpRJe82iXhyMLaqyrkw1I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YcDtksZL4mXd1uzZIp1hwPotroUvzp+KQK12hWgKb+cn4Dl2qHjhgnZYsQIViy898+yyTSfA1OUtZq07Jsg4YhV+b9Pv3tIOK9Q/dReWaGCc+DleJLlG8upjbDRIi3bagCy009nmVgu50Q2CeWb7SgjEl/FqT+rRuAfOwIKa/aA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ow5pFg6C; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ow5pFg6C" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5d3cfa1da14so2708357a12.1 for ; Sat, 04 Jan 2025 06:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736000446; x=1736605246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=L97nnv6RYOpgwrTXImS1pc69DfgbqhSWnbNEYnc9INU=; b=ow5pFg6CaTA/hcWtoTSj06wsoRgiqzd/ae1ivXfqdPXj+DD9rLkOROvkawHF1aXVjK zVu8kuBM/cjvjbt+ywMhC/FrXusL9f046/kRdU2yB76nGhS4pkgMSfwobaGkXGbER/h5 RBnCaHAd2zieUp/QF8JSZCyfTXZNgBF7n/ML4o9Czl7f8Z2tV3AIFJ5eJLVU0lSUirze rmA0h4BcN+okUdND10jcH3Z1HOib6LPqCvoiM/ajzgdgXmSx055PzWTq7OTsVS7knCUx y7DPxuMWSLfgoAiuRoxaWB/jNh2Tn8ARemLK/5IplPLSkini8AVu3uidZOFMlWlerbVO ouTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736000446; x=1736605246; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=L97nnv6RYOpgwrTXImS1pc69DfgbqhSWnbNEYnc9INU=; b=Z9bGSVaCc3bG6QTtoucmCfYcJ/Gyax8gnUb4oFjh6vDgZucu9pRySb+ZVrCdL6Nczn RYR4Gf6FbKOMPkDhvCkCDzQXgUB1d6TAApAbiKgZ20GrFxKiqmT+4EEyNM63AVqMYhai HgUU3cKFecN8PHEbH985y87lq9CpJKhViBa1f1/xZyVLShiS6tenIu45XAH1NMGdgE7M TPXJY/I6oGWvNQ2aNnLnCbIvxj/RpCYMEbxoWQixNT12UPRJszldMkVKYK8VXvESt7pn +/k9gMhMeIpHRnbI9YTglbjj1I6eF4btTrUGeOW67TAfutrcsRhY5jCCYqGV2P6+FfXW aZ4Q== X-Forwarded-Encrypted: i=1; AJvYcCXv/xzyx3s9KkXi55zuMDTQcWVRTUsTN3yVMB+TZomtPkfVg+hgHz2Q9pZ7BA7s02qkz/68lMUbWeIp+0s=@vger.kernel.org X-Gm-Message-State: AOJu0YwcyGJpnrDe/thPJ/QQEHwXxzwu8ZBQvSzcNCpLQaUwwzc17LdX QDSdYeMsYQWIy0QqwqshBx0XoK7ExGoCdZ9ItckyWX2bLtUr6pBMa598/uAW4oM= X-Gm-Gg: ASbGncuBaSKSsLBG2YL+k2wOfXn20DgDHOGeq1YpTfRXaQc69u3Mc6Q5vFUCI9ABa23 rNJT7QYLoF11RbB/c0G4XBS8ZgxxFFwuwD5cTdVl/iI+Nx1n67ltau7kLiqMlD1LCY8bJPsep8J s7lglacnzCHxj4G8g7wSiqwgQTWvtvyQOkdURTAbXqDYaalSS/w8Wc2A/lNWzNWB7+gTspKgpt2 HQMzu1x1z8WeUKGAhd6hhYLPUgvm6NhDLV9vt2vVQaH9b8r7llbevVDjGZ2WeGxWR9tsbo= X-Google-Smtp-Source: AGHT+IHwGbZVkG211x6UmHpmKAUnIk/VlBs5m3FZ70AqueQY/czbZ9SdfSt4tHy7ZtiCXAg6lm0+Cg== X-Received: by 2002:a17:907:d15:b0:a9a:2a56:b54 with SMTP id a640c23a62f3a-aac2b0a5754mr1871809466b.5.1736000446253; Sat, 04 Jan 2025 06:20:46 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f828sm2013944266b.19.2025.01.04.06.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 06:20:45 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH net-next] nfc: st21nfca: Drop unneeded null check in st21nfca_tx_work() Date: Sat, 4 Jan 2025 15:20:43 +0100 Message-ID: <20250104142043.116045-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 b= e NULL? Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman --- drivers/nfc/st21nfca/dep.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/nfc/st21nfca/dep.c b/drivers/nfc/st21nfca/dep.c index 1ec651e31064..3425b68f0ddc 100644 --- a/drivers/nfc/st21nfca/dep.c +++ b/drivers/nfc/st21nfca/dep.c @@ -116,18 +116,16 @@ static void st21nfca_tx_work(struct work_struct *work) struct nfc_dev *dev; struct sk_buff *skb; =20 - if (info) { - dev =3D info->hdev->ndev; - skb =3D info->dep_info.tx_pending; + dev =3D info->hdev->ndev; + skb =3D info->dep_info.tx_pending; =20 - device_lock(&dev->dev); + device_lock(&dev->dev); =20 - nfc_hci_send_cmd_async(info->hdev, ST21NFCA_RF_READER_F_GATE, - ST21NFCA_WR_XCHG_DATA, skb->data, skb->len, - info->async_cb, info); - device_unlock(&dev->dev); - kfree_skb(skb); - } + nfc_hci_send_cmd_async(info->hdev, ST21NFCA_RF_READER_F_GATE, + ST21NFCA_WR_XCHG_DATA, skb->data, skb->len, + info->async_cb, info); + device_unlock(&dev->dev); + kfree_skb(skb); } =20 static void st21nfca_im_send_pdu(struct st21nfca_hci_info *info, --=20 2.43.0