Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp565487lqo; Wed, 8 May 2024 08:12:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUL2C0XGjQwcGMNCeaxKdnE6TCGdli0HSHzeQi7rlcH1XLmtA7MRQVRyZoyjPiMQX0AetXHrj8c1Gpl5QlwDLY0oLYB+EuPmwvy+k+7jg== X-Google-Smtp-Source: AGHT+IGIYqTJ2KhKXPx9rnRyDY5n+O/BQjNITukhfTSSTuXbZvJqARBCeG1E7kEfknm73vXMVWQj X-Received: by 2002:a17:902:e80f:b0:1e2:45f3:2d57 with SMTP id d9443c01a7336-1eeab69e9f4mr45533845ad.6.1715181132519; Wed, 08 May 2024 08:12:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715181132; cv=pass; d=google.com; s=arc-20160816; b=s+0JhgxzAJbbqxmRhDLtXFN46d9yjHK+FvXNbqxLgrD+9IWbwVpP2EbFweNG5YViqL 3TD9FAfI89u7YkYIjNhiHPyFr33usWj3gCa3uz1uVsHAwK0prInDEMdYBQPuN9uplW7N /kEvXUKCjGEg1Pbya1jvDkX3MNjernFDVfvC17Qrtmcs/WghamXy0nwy+xb/1tcR2csT izSHdQfHPQsk/mq/LKGWd1c8FYrohZ08H5duxDZTRvt9l9JWuZObLNJalViHXp/FYJXy 0URyQ9VXFEebmoYKRIHAIEUowJQMtMRV9TQLz59ltdDzb58rzAqX89Mi58Og3XyviSk8 1FUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BqRi4rVcDY1NilJlBX5NPhZU4njDHK74fcDFcqGlIAY=; fh=xGN8GewWHl6hD1qUA9vK/urVUcZnc1k4Vq3VmmbG01E=; b=rZCRfldJmTcFNcNLDvd1xpG490sb/M2u3QC3e8z3NUwYW7Xvm098Hu0Ejb1Wop+NDD LM7xY1WB9sliInhcJyAS7AlzYzYOoUp4PRVHiXzB2jZio6aVrK+hcCGONgFnXBkWeyED E4yNJKJWOqoaE5Ktkh3CSPz0qJ2Vvw8LBj2EoHzL9HPpFL/WiYJXFJrDwLTupC6Mqnfl rkcWpOHj1LRVzbqsauq+2gJj0cN8j+Kv/LlGExRXEBFYC3y/2hG+PNy6KV2eCatKEsv8 Vuvfc0Z5WmXdAk9u0r7+YdenBNZB+eKDssJ1a5mKh1piQW+DPv4MTihPw4gj7Qo6F2Rr WvGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=IsChGjrj; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-173461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173461-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e8-20020a170902b78800b001e02aae12aesi12425511pls.401.2024.05.08.08.12.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:12:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=IsChGjrj; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-173461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173461-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 06AEC28540C for ; Wed, 8 May 2024 15:11:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B676A1272A0; Wed, 8 May 2024 15:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IsChGjrj" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 E800685639; Wed, 8 May 2024 15:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715181096; cv=none; b=AhKbtPjYw7VzPokwPTcPGAnVwRIcXmSzP7ggYdqJk6ZmikZRZW/MmUymao6CFp4w+B7RXzxiiYDrUylbnJUGnv7OYmpbjG8blLqGquTNW/i+hqhxKNFpQzJReCuId2nwUlMXNUnMQMcEqQd05iFG4lEoP8yQOP8jStkoG2TaXWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715181096; c=relaxed/simple; bh=L1DLWHvuPyu7zexdapTcMb+vtU8XUKPHrxxeMYCyJgQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fUYqDZIyJNKecsp9trq1MvjDlbmB9N1wLJvDFIMtyXlohRSTGLfyICF3BN/5rM/eY7vFlea9fL6DLlUwmTYwkOPAiVarep7k+hpryz3OwrjtjqypFDChI58eusCYwqJoLeRILVtO91Bg5EoSRxIhwrek9YTM/qc6zQ3dl0CmzAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=IsChGjrj; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B5712FD6; Wed, 8 May 2024 17:11:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715181090; bh=L1DLWHvuPyu7zexdapTcMb+vtU8XUKPHrxxeMYCyJgQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IsChGjrjUwRqYdCT81KCqbvvuiqqnsLCh2bfSQ1T2vbvXuJqbP7GhhmflprMyLigj 50rG3Rj9GbQSqH0019jJSMGNZlWImoGZ+HCWmOW5Ce4tuXcev+rNal1f5cliRRXlr2 xt6LOVzdFhH/yIV6ne6CH4dyRFQnYR5G9YdxS5sg= Date: Wed, 8 May 2024 18:11:24 +0300 From: Laurent Pinchart To: Dan Carpenter Cc: Dave Stevenson , Mauro Carvalho Chehab , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Sakari Ailus , Ricardo Ribalda , Hans Verkuil , Jean-Michel Hautbois , linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] media: bcm2835-unicam: Fix a NULL vs IS_ERR() check Message-ID: <20240508151124.GB19625@pendragon.ideasonboard.com> References: 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-Disposition: inline In-Reply-To: Hi Dan, Thank you for the patch. On Wed, May 08, 2024 at 03:31:00PM +0300, Dan Carpenter wrote: > The media_pad_remote_pad_unique() function returns error pointers, not > NULL. Update the check accordingly. > > Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface") > Signed-off-by: Dan Carpenter Reviewed-by: Laurent Pinchart > --- > drivers/media/platform/broadcom/bcm2835-unicam.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c > index 3c7878d8d79b..ad55fc930e5b 100644 > --- a/drivers/media/platform/broadcom/bcm2835-unicam.c > +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c > @@ -2433,9 +2433,9 @@ static int unicam_async_bound(struct v4l2_async_notifier *notifier, > return ret; > > source = media_pad_remote_pad_unique(sink); > - if (!source) { > + if (IS_ERR(source)) { > dev_err(unicam->dev, "No connected sensor pad\n"); > - return -ENOTCONN; > + return PTR_ERR(source); > } > > unicam->sensor.subdev = subdev; -- Regards, Laurent Pinchart