From nobody Wed Apr 1 22:34:21 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 5744B3CE48F for ; Wed, 1 Apr 2026 10:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775038245; cv=none; b=F6ExDHtPOLTYUrzQ/a2vfZeevJnX5BWKClCv8Q194qMQv+OxEiobNQZfe4jSHe6Upqd6ff8XAaSFnPOL2NLb1wnL/aiIPb7WVeuC+0vWktVNtaAB4WzqCCH9QQKv+scp2BpuKyr69VPV8SpLBJnJR7zTLzX4uaguMoc9ZwuvB2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775038245; c=relaxed/simple; bh=OxgRed5VGwAWLayyza9kbjGRjLkirUY+SqCVtIEKjHg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GkXosmaDs/hiOnSaUZrW9EZM9t8DsfmOjDdVGKR7XAYjY61yS/eah8n/mCYJ2DEJQHObXL/0L/XueJSrW0qx+hA5Xd31rfcg8dLlUe2HF+ngWY5KWhusR2R5kV2Li4eYqJ0htIo1S3xEMJeKD9tFJYz7C5ahVijQmenOGMUVT6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B7lgKY1A; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B7lgKY1A" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-43d03db7f87so1576828f8f.3 for ; Wed, 01 Apr 2026 03:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775038242; x=1775643042; 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=AOibjlz3Yfd9V5K3zd5unxoZi+Ixpxgyr9p6TIdkJcw=; b=B7lgKY1ANT/kuhtIQGJPEL6llxpsDFUtZlCtnSd2NryD5FlglfrUW7pkPURPiK/+sv ROINUBzqwzoeauI+c/+StFQEqfFJwxDdy9lQ0agg9qYYCurm7VZgCkD2ipTB+9zUR6zK 5zpqnFAue1oe7PMzGECg5djtzF1CJF9plMYMDSbeIhDzoHt+r7rZ1p43i4TUm3GvmEUW B3gK8r2JhqyHcBjlPx7u9cn35xvPDJbOsF05+J0kkCb9zuZdxI/ChK/o3lWF48QQ6397 UJwvRe0RIC2IdRfsKnKn16C1Wf30QYk99F/9tG2bU2O8opuydu6EdweNCxkvvmtStiX8 fZYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775038242; x=1775643042; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AOibjlz3Yfd9V5K3zd5unxoZi+Ixpxgyr9p6TIdkJcw=; b=bWg+vRmJqDHT8Z0qhuf2Yj7IxE+Tffu8Z0hHXA78q0ibRBs6fUgkhftSDtGaCwsn7H Y6X93YisfEr7BtW6kNF6Fj7xJTFrT/1faGnh/MgN4U3Lw28WxY0qJpHA1+tkKeZ1DTNo +8dAeiXqFsAIllBomDHoOeMJxldeQ11XVohpVf/WD6gqixC0wlzZSWxsIbir50lcbmPf hyocQ+/s28VKd21JnwsJOCHy7wEapyQfpwCfn/hjNDD2RFs8C+DNLGC9sFc1hQUcj+ox Q2zON+a8hSZFgkNQWX5RzYPlpbFtvHzDnoSDtdfMbKTd6Z5E3a2gUF5ZFkd9sNyOSL69 NeqQ== X-Forwarded-Encrypted: i=1; AJvYcCUVAFzBObrcrt5tZdGmOMkLEvAi9b34fD2oBwtMAxEh70olg7twElaPuclNASMS5MFTcYI/DoYuilfzQ3c=@vger.kernel.org X-Gm-Message-State: AOJu0Yxu3w4Gs8JxXP7rsPe+IG3N9eoyGUNKUzlX4Or8FABCaSLmLg3S NGbMpqLy2aGbwwoH4LC6tmapRmEm8Kp3uD42gBIKwuy7icSIUB1VunPO X-Gm-Gg: ATEYQzxDKDUnQ4Qc8rCiy1niVQjIwg01D83KdYLROw6KkoTkxq6+kCf6j42Was2pLrT PW+wPoNPetVgJpXjeEir5uBkkLs62k/gRaqfwAY0quc7LhFUYj1cE5EOaLKgNmYf67YwrTfQF9l 46o/SLCyOLsElFtrgzeNJbYFnQEnHDOhYbDhYgTRQivjum96m08YcZApGpaRxF1g830Ic2RW/8z Yb0SFjFtkwxmEO4745CewZ0edYlttFZJ1jyr0icayV/Ah4AIGpob67YpgVDD833Fi+EId1wa5Hv aAX+bpgv7bF4HCieAUBWs0rhwBgfCo3oAEoX6EF1hqSulmdFX03CsXx37Pt6l2mZgnhHDH3pQv8 glOktEoC4vYcEFUk1V7DibssRCi1sdsT6vSWOu/CqU87Zz6gLWbKjInmVpMoCYOa5KSrQGPxRcy BBYlKgzD0DmREwNNECumGAHIPU6hE+OIvS3EEFjPpqJxwogP71O5Oc5opP/kHD8PPN X-Received: by 2002:a05:6000:250a:b0:43d:604:56d8 with SMTP id ffacd0b85a97d-43d150e00camr5254239f8f.49.1775038241490; Wed, 01 Apr 2026 03:10:41 -0700 (PDT) Received: from MacBookPro.localdomain ([2001:8a0:6c9b:a000:2d1c:ca82:e123:e111]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf24707f2sm36139165f8f.26.2026.04.01.03.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 03:10:40 -0700 (PDT) From: grondon@gmail.com To: gregkh@linuxfoundation.org Cc: error27@gmail.com, christian.gromm@microchip.com, parthiban.veerasooran@microchip.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Gabriel Rondon Subject: [PATCH] staging: most: dim2: remove unnecessary NULL check in try_start_dim_transfer() Date: Wed, 1 Apr 2026 11:10:38 +0100 Message-Id: <20260401101038.24304-1-grondon@gmail.com> X-Mailer: git-send-email 2.33.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" From: Gabriel Rondon Remove the !hdm_ch check. Although hdm_ch is a function parameter, it is already dereferenced on the preceding line to initialize head (head =3D &hdm_ch->pending_list), so a NULL check after that point is dead code. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/acwjEHyEYg0V3OyC@stanley.mountain Signed-off-by: Gabriel Rondon --- drivers/staging/most/dim2/dim2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/d= im2.c index f5bd7d44f..327790436 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -165,7 +165,7 @@ static int try_start_dim_transfer(struct hdm_channel *h= dm_ch) unsigned long flags; struct dim_ch_state st; =20 - if (!hdm_ch || !hdm_ch->is_initialized) + if (!hdm_ch->is_initialized) return -EINVAL; =20 spin_lock_irqsave(&dim_lock, flags); --=20 2.33.0