Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp321617lqh; Mon, 6 May 2024 23:08:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUikUHHMJkGOLCDk1N60nLKxV49FZmwj8+CvQ9sgFNaXg7vEN1S8uTAMjmYDqVV0VQAkqt+LIcdjbYSnECT1wU6U+5guhu1OVdZlorEQ== X-Google-Smtp-Source: AGHT+IGQN4npiMF7ERDEYzc1dXff3OJhrspOkwG3lld7YiqBT7pKRj5FyQSLhmbzlPNskqjjlrLu X-Received: by 2002:a05:6808:30a7:b0:3c7:5146:c4e5 with SMTP id bl39-20020a05680830a700b003c75146c4e5mr16189919oib.41.1715062114321; Mon, 06 May 2024 23:08:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715062114; cv=pass; d=google.com; s=arc-20160816; b=BcsJZpkB9JctpA3tyQxEoGGITuYJ1xC01ycAf8zf7/FNkf87YL3DuQSjcpYdCWVirW 7xU4WqQSPDFRpvsfd7UEyLYdSg7sc/sQCrSvftJB+tTm/WLVXp9DLwlBeYfQATwV0/rV 9tMBKqqILs0lwBvOCehj/DDkmRlDRGPm24cHoxjkeOPROon5mbB14sEMfLWeZDy1zdYn 74MfWAFlhLp+UbjMeEyjdXQVHyNwiOvxnXCiIwsnMuhbLCDprBrTFVyubaT9PAFWR87L qlvlJeMVfgY2XRjVevdBkZ1XtKui/ZUcAuRb8CDvfAC3karK17DW8azOwuWsCmwqk+3H sVuQ== 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=+pFiAuL7ipf1ybwHIje3WWvT4cTLXUQcwI6ZfC5fFvc=; fh=aI7HXplajwh9PHGog/YD/WLsw0Yjp3/63MYIgCPOFoc=; b=sofq7MQuVvAslCiIJe2WxuZr5TM74uPV0aj+hdMJm2jIqNmzwqW9NWPkOXfBUY5upy 4mnZV7kwawiL2dT2E66rA95SsxOOc0qSjzCvZe4YQbBI2xdejWT61NjCZHshyUAHReiy DHxChgG9ZiGb0wq/ZZ5MfsRk2grortdJkgIHTaVAYEPc+L58Xra0RygBiaCK6LjsCo53 yKL7BA5P997rzKqwNZwGu/Yr8ibJScOV0Iail7jgVvwXvpfHqDlWxWE2pT6tdZej/Fte MHbNRIxkRO2EbcAi6VI9D7JzAI6yhRbOY/MNkLVIuCS+pUIijBsH1JpVg1mH+63bNKW/ yNWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jfHwyLQQ; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-170726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170726-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id iu13-20020ad45ccd000000b006a0c56ee689si11171171qvb.604.2024.05.06.23.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 23:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jfHwyLQQ; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-170726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170726-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 056791C20FF9 for ; Tue, 7 May 2024 06:08:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B45206F060; Tue, 7 May 2024 06:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jfHwyLQQ" 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 8C3646EB49; Tue, 7 May 2024 06:08:24 +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=1715062105; cv=none; b=mPGuVpuJgiIM6WNhzFYW0hGggI1YwukC41Y5thy/eJJxzLaavEiSnCuJhYwh9H8AWIwitvymzoM7dJiIn8770UU5eIxAYeFweQqnNUECvHMkm4xtwLyAUQlpOUd+kwRIYNYIa63Bx+tpnRerubI2NF1DZVDzqHXeWaX8Nd3qug0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715062105; c=relaxed/simple; bh=gPBtZdsiM39zs7dB1Qj1xMuRJUu7VfRf6B+HMoFaGYY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qZbAhB720Y/9UZSOP8YapPjmVag0PDsx+tnThLz9OMtkvWs75Gghm81hRdJ2k9Md8j12wzV3GJKWTfptef9ZhOIO83CO9nCRjNa56OJcbk2CDTAxNIsMPGKEPkTFbFhzoMPQt8PLfICOZUm0Cu/edpG9p9un1HKjI9tCdM/V1dI= 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=jfHwyLQQ; 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 00F2D3D5; Tue, 7 May 2024 08:08:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715062101; bh=gPBtZdsiM39zs7dB1Qj1xMuRJUu7VfRf6B+HMoFaGYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jfHwyLQQ9AJyjNKkVYRgxcL6T2Xsy294Ar+pIIrO79t++/i2t+vKSiIAxJ3j+6e1x 5kftqwFOCFQn5rQ+SPESSHOqI6DTzyv8C8d1+udguAQf33qaGMQdXKV8gfmIXVXUZv HXDVNIrji2lYGDFkeZn33c0GV2FI5VoSf0zb6bpk= Date: Tue, 7 May 2024 09:08:15 +0300 From: Laurent Pinchart To: Ricardo Ribalda Cc: Mauro Carvalho Chehab , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil Subject: Re: [PATCH v2 1/2] media: bcm2835-unicam: Do not replace IRQ retcode during probe Message-ID: <20240507060815.GF26689@pendragon.ideasonboard.com> References: <20240506-fix-broad-v2-0-e6a2a5c0d609@chromium.org> <20240506-fix-broad-v2-1-e6a2a5c0d609@chromium.org> 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: <20240506-fix-broad-v2-1-e6a2a5c0d609@chromium.org> Hi Ricardo, Thank you for the patch. On Mon, May 06, 2024 at 07:24:46PM +0000, Ricardo Ribalda wrote: > platform_get_irq() cannot return the value 0. It will either return a non-zero > irq or a errcode. > > If a errcode is returned, we need to populate the error code upwards. It will > give a more accurate reason of why it failed to the caller, who might decide > to retry later. > > Signed-off-by: Ricardo Ribalda Aren't git commit messages supposed to be wrapped at 72 columns ? Reviewed-by: Laurent Pinchart > --- > drivers/media/platform/broadcom/bcm2835-unicam.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c > index bd2bbb53070e..60c0fe956c58 100644 > --- a/drivers/media/platform/broadcom/bcm2835-unicam.c > +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c > @@ -2660,9 +2660,8 @@ static int unicam_probe(struct platform_device *pdev) > } > > ret = platform_get_irq(pdev, 0); > - if (ret <= 0) { > + if (ret < 0) { > dev_err(&pdev->dev, "No IRQ resource\n"); > - ret = -EINVAL; > goto err_unicam_put; > } > > @@ -2670,7 +2669,6 @@ static int unicam_probe(struct platform_device *pdev) > "unicam_capture0", unicam); > if (ret) { > dev_err(&pdev->dev, "Unable to request interrupt\n"); > - ret = -EINVAL; > goto err_unicam_put; > } > -- Regards, Laurent Pinchart