From patchwork Mon May 6 19:24:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13655924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BDB93C25B5C for ; Mon, 6 May 2024 19:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Du4j/ydSQ5MEJ8Qzcl7L9/QO6gaFUs4e1v3RCsuuJ6c=; b=3nEWDAT8/wSUBp 6L9uxDgi/IllnsMhxvjtcIiY9/z/F5QHtt9D0OiX+A+WHtrxxnklOzp7AgDx3tJ5Z6UP8F9g/EH1K jqEndTkf15kJLfjSwvh7nLAI2g4L41tZCl6zXLi4wmuBx7oNDfDDb9sGOKAHhM6sYGP30BcbDGTG8 q4UyvL2y/pqX0TtqhSiRG2bBCqS53oStB1ese3dZQyu0byr9IiYLgZFk8IfucpDXAm1Wy+xYCt/8n 1rZ0GI0CRmV6WwhqGR/LpLITSGBHQTOGzwkAgg6DfOyHp9+6OzUyyCBI5QY0bFxvdp6IjS6LKb6KT 3X/M3ShtVGLrib9aA5+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s43xH-00000008VT6-3iJJ; Mon, 06 May 2024 19:24:55 +0000 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s43xC-00000008VPN-33Hc for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 19:24:53 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-43d2b4d4d3eso6530131cf.2 for ; Mon, 06 May 2024 12:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715023488; x=1715628288; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sERH3AW/jfrsCIvECuFC7tcnEgKRlBvngV0r54MZywU=; b=oTzC1AlkL1fTWrGq+Nk4h4eA8Kg5a1Yru5m22haOjSSu8e9Qp8EYpX2IZmoUKUravI 91H5V7KmAYudO42MLIuLDMIuyaLy42iMrFYyFaNQqyEtbftAh4BFG7cYOgkWM7JO/xNV XQIhveFMZO+KWTF16P101N0cRre8ayZtJjpNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715023488; x=1715628288; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sERH3AW/jfrsCIvECuFC7tcnEgKRlBvngV0r54MZywU=; b=d+5hhjmm9FG+CrYeMDF0sWQ1p20LuvHT/78wG34ohWXfIX7UaG8eux6LeHaOOmjVJB JxuozhGtX59qZkzvQfdQYxLEIEJUNXQr1Sgvll01wRzpsOXVmezONE7O9TW0inz/khrO kcmIayrdLdlXMnms/I3gu3esd9NLUEGYsgZjhbUWr6qdZsHMAXJvfSQ+66OzTWan+H1T hNtWY0VS5CON2xR9JUbxRSbRufFYkRzcOod9zCVQgIfOq/0J7Ei+HV6LzqM+rUvCmSnB 4s5HTwoocJMtXGlJjifB0g5baTU4WQrJTOpqiDLnBqc4yoGHVgtG4h23WBcwZu2E4+d0 z3Gg== X-Forwarded-Encrypted: i=1; AJvYcCW/hAkR8Zhj9uV4V+x7FGllHYOzEI9uSeEPe07sL/XG1YRgmS9SXlUWvvUehZrI9uivV2AHkjSeIbD29ZLgmmeHNjr1gh9QB61c0yqK1HeE9FzYd90= X-Gm-Message-State: AOJu0Yy0jDudyR8NVv8L2nUMUgHZW6Kb59GhY0BY1BCRjNE9p3K8aL2+ R6U+B+33z7a9HFF/0CkuHLFE7Um2/29yMIK8abv7tidokAUFKTc7NWtoURFwFA== X-Google-Smtp-Source: AGHT+IE7wQrVOaXIB6u6ahbWEXnIqKIxesTWerqc3J7ZVDikE6i1K0SYZJY5aGJnqDPOw+uBmngdig== X-Received: by 2002:ac8:7fc2:0:b0:43a:e5b2:8627 with SMTP id b2-20020ac87fc2000000b0043ae5b28627mr13527239qtk.62.1715023488343; Mon, 06 May 2024 12:24:48 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id ch9-20020a05622a40c900b00436e193f408sm5439870qtb.28.2024.05.06.12.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 12:24:48 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 06 May 2024 19:24:46 +0000 Subject: [PATCH v2 1/2] media: bcm2835-unicam: Do not replace IRQ retcode during probe MIME-Version: 1.0 Message-Id: <20240506-fix-broad-v2-1-e6a2a5c0d609@chromium.org> References: <20240506-fix-broad-v2-0-e6a2a5c0d609@chromium.org> In-Reply-To: <20240506-fix-broad-v2-0-e6a2a5c0d609@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_122450_827832_D7290EC3 X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 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; }