From patchwork Tue Apr 30 07:51:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648439 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 BB750C4345F for ; Tue, 30 Apr 2024 07:52:04 +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=qEqoDu+xRGPuc9SfM7iVwLWr41+JyxP4OGweVWS++bg=; b=PJeV1Qh43TnNVo tJNmkeFsjXulKMmPA/FL/Qks3r27CKKL5IBCZv+8ZapIY9L2OMmrreoG/qVCxrBgIXro36pKKxia9 pUQCx3lvBUpIaYPGWBH+2XXb/ZRaM30Hucg6maEGIWHZbsoX3nIPDxuanBgHI9NiugHzLy7F3PvU0 Y4bhHadN3VfbvjOrxXrDszcpH5S7ytZ93dKUvQMqedOu5C4MxZBlqpIwgCG0AQ2ireVV4YearrQRe N3ut+0+qojAPa1Jqtv2qyI98+aQsaoxHpcc7o+5kuwg0+Mf+t0mEWKhskZZrGVD4cMmC7zbI6VhxN VTnL9Iw0By02d8AtbZog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iHF-00000005VKi-2DTl; Tue, 30 Apr 2024 07:51:49 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iH1-00000005VDU-1UfK for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 07:51:36 +0000 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-43ab76cac73so22011311cf.1 for ; Tue, 30 Apr 2024 00:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714463494; x=1715068294; 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=4cXQjmuyZkvWHadrmTQe5KOC06n35bYtQrARXW4y+Vw=; b=N2oN93mKJXJXCSeNgHHTHB7cV/l6tP8H6TF1PLIzEgP/M09SXpeI9iornNk48+r2mV 0XrLpU0CTOd06Wo9ICjvWuy9Dr6tj5dfexw0FQS88K7URouhDofBZXNJN7ywgUmvskAM aifi71qXnN+RehwsAX1oeYxmDzpBw8fGTfO/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714463494; x=1715068294; 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=4cXQjmuyZkvWHadrmTQe5KOC06n35bYtQrARXW4y+Vw=; b=CRl2hj6XRGEnN42v3CP7xLoNWewk0hPK/4hrTuoCypK4Ya/et8PTIMY4bwOxGJ7eOA PZ/Io2foPmIpvFiYAZsYeg5TXbI3uOzWeyAKYCxuhhbqDlHW312cbYvLB2u+7BogmSBP XMcljxCMRythKISt6YAXtJ1GTsYoDu3VjPDlwAAck5/xZcWd4Xv5UJPYM7mxDTPzRRow b1323QXqJwl1UW6ZbyZvgt70d1IAFAcKy+dSno7Y7oUI3pwn7+v7Xxga/3+egJ5KwUSV NXXqSos8hVtA2dR9eEoBlAdoPQMxZO2FB4hfiCWNiJJtXz2fxWkcgCXphOPJNra2B061 QdmQ== X-Forwarded-Encrypted: i=1; AJvYcCWiKbu4rApAiQ5BUJipl2+LBz20mZN9wEbU4NtsGxWEk0G4Pn+J32nwsxoDHByYpzi4XNbFgd9sb6LEsKaN1vtHfP101qbiftdWWDvbwVDrNzYQWYM= X-Gm-Message-State: AOJu0YxsfRijAFZeLJUiSLh+0Og4TRWnsd635rTbNEoC1YdSv6+kRLxT 73notpzQ8hbDh/ZAfYLlTBPF7pmKZTTim2syAkzy0J0K1VSf6BjkiF77CcTpgw== X-Google-Smtp-Source: AGHT+IHJbt+AhqT6dvcQLRTeZ4YlJCvCSrE+7BncIk5ueTVJMqXmIFfvv1LVEly8aKIAOwJjytQtBA== X-Received: by 2002:a05:622a:1895:b0:43a:c90b:34e5 with SMTP id v21-20020a05622a189500b0043ac90b34e5mr3440108qtc.34.1714463494446; Tue, 30 Apr 2024 00:51:34 -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 z11-20020a05622a124b00b00437b4048972sm10634547qtx.18.2024.04.30.00.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 00:51:33 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 07:51:28 +0000 Subject: [PATCH 3/3] media: bcm2835-unicam: Do not replace IRQ retcode during probe MIME-Version: 1.0 Message-Id: <20240430-fix-broad-v1-3-cf3b81bf97ff@chromium.org> References: <20240430-fix-broad-v1-0-cf3b81bf97ff@chromium.org> In-Reply-To: <20240430-fix-broad-v1-0-cf3b81bf97ff@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-20240430_005135_431664_7370A48A X-CRM114-Status: GOOD ( 15.20 ) 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 Use the error code generated by platform_get_irq() and devm_request_irq() as the error code of probe(). It will give a more accurate reason of why it failed. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index b2b23d24da19..0b2729bf4a36 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2660,17 +2660,13 @@ static int unicam_probe(struct platform_device *pdev) } ret = platform_get_irq(pdev, 0); - if (ret < 0) { - if (ret != -EPROBE_DEFER) - ret = -EINVAL; + if (ret < 0) goto err_unicam_put; - } ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0, "unicam_capture0", unicam); if (ret) { dev_err(&pdev->dev, "Unable to request interrupt\n"); - ret = -EINVAL; goto err_unicam_put; }