Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp301629lqp; Mon, 10 Jun 2024 04:55:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwhP0X7LSB1VmfqsqZEkOaY5Ul3w7ZNGwPMRYdYmz3CC7Wb2HMOxYxS7PaGBos/Fygn6zcRYW6cRVMzVc+7BBLyeZ+MEGa7JcjNkdlyw== X-Google-Smtp-Source: AGHT+IFfCvVxLpsZDhgHJAUWFdlroaCf7sG7ysy1btuiJrN7pS2sZl5o3oVaBLH+SB5z217ys15K X-Received: by 2002:a05:6a21:9991:b0:1b4:772d:288a with SMTP id adf61e73a8af0-1b4772d29edmr9540423637.23.1718020531894; Mon, 10 Jun 2024 04:55:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718020531; cv=pass; d=google.com; s=arc-20160816; b=zB3mnymrZFDA99f/lE3VkgGAb4mHirvm4B4qoWtYNefSgId9u6xuHbVjX6OEJuxoM0 L+Ii4T6gDHpBP86aBzS4963o17KdnYVCDQuc5siZFbQCSl2lTPGXtLRGwamQvksfI0Dv iha/awKZvytY+p9PgU9XcZKGsdFLB66PjXDwDCOC8Ee66r/GIUgeka2d+9lhenDlV6tl 5WEaBOlijMPzlk6LhFJTR+66HNjjv80JBPM+vv33oMfBpd3i93tGAWUXwz3Q3o/7jOqj x/4BnK7qfzR06LzH7H5Lh6WenSgOKP19pc/d4UIbqq9dShXxiAolSAldeNRzGsr5Dphm hsSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=IbdYmmh8tN4/nKlDdy9qsAUGIKDhqQ2PTdbqIvY6mBM=; fh=4ImbzZ8HyrqV3RH05YCYsmR0UjzxFX8R5MsOC70Lb+k=; b=JmpmuDG/KStMwNf6wzmTMwcU6qDxhM0I6AomBvUNz6jHfM7ezNAKxE9nDb2qS5Fb4D ZEwipYZ2k9oeoxb8CVAsLWiJDdJ728LNYE950XGY2Cg6cPN5I/uYhWMjxAFr80Z82oh8 b43zLNkdjRbht6ytp8+mSOmbhpTgsMZF8KKGzp6k9vDUv35Dgi6RIeCO6zJd/3IXnurr HCNiEr63fi3PkIG1iBJw/EgRnr+799vqFpBzdle8c97FbHmyt/0Hjgs1ELzyNRaZvlNy Af/kKzJA5JlwD1bbMN0Hci4i7ECiuYawbIbx3Y2oRczXh6aLiIOhOn2xtU5zfIH7oqH1 57RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UAihqqsn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208084-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208084-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6ed804b55si34152085ad.301.2024.06.10.04.55.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 04:55:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208084-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UAihqqsn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208084-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208084-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C9868B2335D for ; Mon, 10 Jun 2024 11:37:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F6C87D3EC; Mon, 10 Jun 2024 11:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UAihqqsn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3664F2594; Mon, 10 Jun 2024 11:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718019453; cv=none; b=RKuZ/8use610S4Amfu92a2yS7LfIsmwEZCQmwisQVuztgXdZJORCX56iVPGgJNtB6VpP7D2pD/+lESxa6Foh9dqLuq0sDtQJgLkTqRn2I2cgdAhCTGdUAYu9XOYKDJbTDvlhrBUKE9LVQwAaTd+Mv1yoHTFKeJC5JvVxye1OJI4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718019453; c=relaxed/simple; bh=W5QzFncy0sUTy2B+uXEQTMtsMrR22hJS0osVxJ7jZF8=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=GMsNmxpON5dyGJU8nhR8HEBiXVlD9RCJ4YDwfmxu7A5RaQPwMir4GG9uoHy8qoOFG1X1xbHdVwsezwYErqxeGJxaEPbFSP2kZedkNEMyh8rD1oSy745vqKLy+u8CwAH4WRqfwhG8QJ/XIhlKA19WmYhNc4YEOFezOsBwCa9zIiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UAihqqsn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DA96C4AF1C; Mon, 10 Jun 2024 11:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718019452; bh=W5QzFncy0sUTy2B+uXEQTMtsMrR22hJS0osVxJ7jZF8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=UAihqqsn0XnGRCucJWFCNxmRvk8TZlo++RhoqeW6SiLXJW3f/EIFyyKSJUNWNC9ak /Iq6ALFJZhvYeOIa9kh24gOnK3/HCqMMyFldZQSrSjjhYpYCB7XOYzr/wUC8PuQ/8w c99nxitWMQCtKSJj2K/FXdI+hbKiNYCWIs76EfqAzhFX/DA+mFBzbF687jJARrHRD5 +fsOLl43LeJCWZPGEy95l7d5s6xLw0/ibmN2a2lOEiMRD36izWJo1qx7ic5KQg6dMz EbCW8a0Wmke49XVE3Iots7qdCl71BlQ+QPqg+pC5YD8Ary1mROmWlBgjHJhvU2k0FK MyGxsWuojx2wg== From: Robert Foss To: Dan Carpenter , Dmitry Baryshkov , Andrzej Hajda Cc: Neil Armstrong , Laurent Pinchart , David Airlie , Jonas Karlman , Maarten Lankhorst , dri-devel@lists.freedesktop.org, Daniel Vetter , linux-kernel@vger.kernel.org, Jernej Skrabec , Maxime Ripard , Thomas Zimmermann , kernel-janitors@vger.kernel.org In-Reply-To: <6c8c6746-34e2-4a97-9dff-622ed29071e9@kili.mountain> References: <6c8c6746-34e2-4a97-9dff-622ed29071e9@kili.mountain> Subject: Re: [PATCH v2] drm/bridge: it6505: remove unnecessary NULL checks Message-Id: <171801944880.382402.4293639602145071155.b4-ty@kernel.org> Date: Mon, 10 Jun 2024 13:37:28 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.10.1 On Mon, 10 Jun 2024 13:50:26 +0300, Dan Carpenter wrote: > Smatch complains correctly that the NULL checking isn't consistent: > > drivers/gpu/drm/bridge/ite-it6505.c:2583 it6505_poweron() > error: we previously assumed 'pdata->pwr18' could be null > (see line 2569) > > These the ->pwr18 pointer is allocated during probe using the > devm_regulator_get() function. If CONFIG_REGULATOR is disabled then, > yes, it can return NULL but in that case regulator_enable() and > disable() functions are no-ops so passing a NULL pointer is okay. > > [...] Applied, thanks! [1/1] drm/bridge: it6505: remove unnecessary NULL checks (no commit info) Rob