From patchwork Tue Apr 30 07:51:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648441 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 53B5BC10F16 for ; Tue, 30 Apr 2024 07:52:14 +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=6FDqmuz8HRKJC7NDG6fTTIiQeQHYvUIdxyV+/lRHRCc=; b=CYCOvxfWfAGKSv ywR6Hx33tBp/J8NQS+B0puJWu5aBC1r9d5TMq8x94fLBPv7i+pYp6qJi8mKNNK49orDLHYfVokT20 L6FQqW0mZ7JvijeqapcVen1+M9WnQY4AURxsVz2Q274YlsS819HZI7+YO7RqDa5vemxNq4PLM3DUo oYEhgZrDdkdtcC4OT3nSo02Mc0oMVTZk7RSxmy5xGrOO1qgedK1nZyPmH6aVmBeHA0optT1Fq1hqk 1GHA8iAiGUlX5aJiDZwHzppkdZz6QdsGRalI3sKxu65iy/JxGxTDOVjCRBKXKRwi8+dopB5jl6mvN 5UAK277rX2uC4klVxMPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iHP-00000005VOi-3rcU; Tue, 30 Apr 2024 07:51:59 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iH1-00000005VD9-2wUT for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 07:51:38 +0000 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-43b0b09d012so6658401cf.3 for ; Tue, 30 Apr 2024 00:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714463492; x=1715068292; 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=R57CjkbkLkl8A/VUwKtkzF9x/otNALa5HeVqDryNHrA=; b=keHwjGfrmN0CG0yNme3vzjDEI63r57IqOE/CucG/ILHVEdLDyu+DZPiOMrbQA+rOmS o0C5KiFBsneTI277tPIqKa2Se6pGjhIJihV7l0nIMOFfho/EfWHZwHNRNww62VGqWCiW nP7z+ARVzfhzJmQJhRv2hzvE+bCvyf19EHLXE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714463492; x=1715068292; 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=R57CjkbkLkl8A/VUwKtkzF9x/otNALa5HeVqDryNHrA=; b=vgQ8euXHP+BRdJa3vRXXix8dMQKgmV2osOhzk4wESlOLrnGXZhrGJXZgK9+OQGKXhP mySvLR5/n+mFQFSKNdE6XNqrsObxkG/wfNFm+g2qmLg2z5yIQMDXrKHY7/fjP+fdd9n6 0jpMbL9mvVGpsH65AP3ufHELprtYeuJc3+QwdL+0qFzEOmHETDFu+9+ZwiEoFadngB6P mqNUTdpPmkM2qaOBU207i/97JzEuyBWOF2aU0kBoFJVhoN2RFdqWqTXf7r2ZBXOjZcBf W71JtZt3ifwYsXl57JI0+vGsXgXcF4IpgC/6HkIgDWe0Oz6l8WGKdgwiMSAEdOLrH72J f/Zw== X-Forwarded-Encrypted: i=1; AJvYcCWMC2mQktE48+opHBwzcelCI88SQuVwvDx8BETUvaBAzAmTFXl9AOFJ51jBx+d7bqyXsXm5w0Dkg9/YOjE1vIhwQYO7x57h7Io5r6w8j/9Grcue/1k= X-Gm-Message-State: AOJu0YzthMxdR0H4kzo7GvANAT+LafELTQGwbBCV81M8HgRLs9rBd7gs PytCbv/AKgjNBfCWbiNmXj2PDCvZTWCOsstS+SUCj3JZ6Tja7NCS6BFNLAIFZg== X-Google-Smtp-Source: AGHT+IFox+JJPaIDfnbJPXdvKCOIVMCsX59wRzBpWnMawbJcnJD3u85NhlKUJm+Q/1EmXzvmqcrFDg== X-Received: by 2002:a05:622a:1b86:b0:43b:dd6:82c0 with SMTP id bp6-20020a05622a1b8600b0043b0dd682c0mr3500422qtb.33.1714463492092; Tue, 30 Apr 2024 00:51:32 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 00:51:31 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 07:51:26 +0000 Subject: [PATCH 1/3] media: bcm2835-unicam: Fix error handling for platform_get_irq MIME-Version: 1.0 Message-Id: <20240430-fix-broad-v1-1-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_824091_95BCA3A6 X-CRM114-Status: GOOD ( 14.46 ) 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. If it returns -EPROBE_DEFER, we need to populate the error code upwards to retry probing once the irq handler is ready. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index bd2bbb53070e..2a3a27ac70ba 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2660,9 +2660,10 @@ 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; + if (ret != -EPROBE_DEFER) + ret = -EINVAL; goto err_unicam_put; } From patchwork Tue Apr 30 07:51:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648440 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 37330C4345F for ; Tue, 30 Apr 2024 07:52:13 +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=+4ijH4yl3Qh4uiZRiS6tn0LsGcy73xTVvnoBhHpJzxo=; b=qJrHdQh/qjmwWp LmqdI74A2VLUN3sis1dhk00TJUKK/JTLLrwwhcaP0FidqKzrDdPuuZBnMY4zG1gdWMJhQoDfIL5lX 0E0vKVIpd4QBozah6FW2Oo2BNHbTyO7wld2G3kN+2foQDT4eCfQrRUXvRDx+gJtw1wNACn1okG/+B 6YnDlHCpm8eBu25s+7G0rYqKjnqnQfTAwRMc2sUdW/hWHGXuJFYHZ31PUrKWIHCNN3+4nPhi/bQQi UEdI559BhpigY1lWzLpC/xl86yt3Du0g2EvRxPg6YG4jYQHT3mPV/bf2hnYjHnJt7wFnX3csuhzuT gmruf0oa88MpUja6qRfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iHR-00000005VPh-1Kba; Tue, 30 Apr 2024 07:52:01 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1iH1-00000005VDQ-2wgg for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 07:51:39 +0000 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-437c32af2efso34040511cf.3 for ; Tue, 30 Apr 2024 00:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714463493; x=1715068293; 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=dyrqsw7hfapafht5q6ARwJmOBtyDG2HfDsUwyULf8rA=; b=S4sdDbmPvD7m/M5nv8NhODkV39kPCPDwGduY8XKtrsZROySqC4bfeejvV63vggCrEB A5Ksdsfkh8iD6zXArzQkLtZhSIYMknm5s1HaNETgbAKOVWxKwHbRIJp14rrk2L3JnTxK UWwbrebgghYP1Iz8liQ3uewXiPxcrgfTA/c3Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714463493; x=1715068293; 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=dyrqsw7hfapafht5q6ARwJmOBtyDG2HfDsUwyULf8rA=; b=Tr4Lb8omtt2W+uHwmzzUrD92XuBOJOOEtxxRQov9ilT6FpkSumRfJaJzrg0gGroLD7 dqRvU30U93/dBoDJuYj/BqkVP5/kgL03Szcjj6BkbPTkO6D6QSdiFKDxmPr7s0+1Xhv+ lFIMmMf0fkW7S2NAwUjqQg4dvTC1z84GWBWLP8wgegvuU52UaZ0L9K7csy/4lmAUHC/Z XlS/V/HNKZP5+j7q+PpYClxS+pmhaiSjndrweTrRPedUm8x7cyv45tO06JeqWkemOi9/ hC7qeeywGOTb91L6/f8EYVRrUY+OCoyew126Al9k6nd8W+XiV1xS5HAs729T7+Rfa0kx 4Caw== X-Forwarded-Encrypted: i=1; AJvYcCWEFfuZiqnm8H7mkGtl6Bl6B+1Ytfyuz/YtFrr3f2n+QR+y/mXOg6kZQyNYpqxCYDe8X5l8CAXQJGF+H1G0YFmArDXUsclfvtj+aZpuZ/skeY+XfPY= X-Gm-Message-State: AOJu0YwkIoe+ZHnq30enckh6+VrKlQiHkVVp6FSNYKNy4qQjo0E9hPOE cXGTlYkNauDKfZHkgPVkaB2yQMBTqdO+eGlljpKQVI8l5nr+NtPb6pn1GWQ4Eg== X-Google-Smtp-Source: AGHT+IECfMNRuKAOBTGNP1xzyMsseRJw3Hkb0lRny7MABhW2k54/n2V9s46e7u1H3Xer9VaXIy6adA== X-Received: by 2002:a05:622a:4d2:b0:43b:c4:4188 with SMTP id q18-20020a05622a04d200b0043b00c44188mr4041838qtx.41.1714463493327; Tue, 30 Apr 2024 00:51:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 00:51:32 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 07:51:27 +0000 Subject: [PATCH 2/3] media: bcm2835-unicam: Do not print error when irq not found MIME-Version: 1.0 Message-Id: <20240430-fix-broad-v1-2-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_835669_B0A7B16B X-CRM114-Status: GOOD ( 12.90 ) 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() already prints an error for us. Fixes cocci: drivers/media/platform/broadcom/bcm2835-unicam.c:2664:2-9: line 2664 is redundant because platform_get_irq() already prints an error Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart --- drivers/media/platform/broadcom/bcm2835-unicam.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index 2a3a27ac70ba..b2b23d24da19 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2661,7 +2661,6 @@ static int unicam_probe(struct platform_device *pdev) ret = platform_get_irq(pdev, 0); if (ret < 0) { - dev_err(&pdev->dev, "No IRQ resource\n"); if (ret != -EPROBE_DEFER) ret = -EINVAL; goto err_unicam_put; 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; }