Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3414367rwp; Sat, 15 Jul 2023 02:05:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFl5BbJA3VVggIxBQNKs5Z+cp3/VlYnqgp/46S1ML+uJCnhX/0xFa0DC85jOhFmJzRpAklf X-Received: by 2002:a05:6402:11c7:b0:514:ab8b:ee78 with SMTP id j7-20020a05640211c700b00514ab8bee78mr1702306edw.3.1689411902178; Sat, 15 Jul 2023 02:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689411902; cv=none; d=google.com; s=arc-20160816; b=mjOjf0xmkg1kICAmLBbyxMQl4SdI6l3fQ2AG8p/2wzba4lvinTYXJYYondW7o8PP0w csw/eA3QGVGfrC1r3+JG4Ka+MCXEKKJOsTj42+gXWsOPeSycuPCoE+W6Uk7BgY5wqSoa 4lU1//PrZjTH3tsYkBF5BrBBTU9H+VFL7CMXM/uhklAkt8nw3S76YPQyxmEzOs4Oim77 W7J+i0BTWHfJQxYEAbT4QS5D0vLW6sCnqQ03+/AY9ZlJ5Cfd698W/RMbSOqIMkbIUJZP ouGYtfaJ3szIJOEyy368oNhr/B8oUVCgNHqcSftIYw10UQ5L5FrzeXI3TBKovju3VaKl MvBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :subject:cc:to:from:message-id:dkim-signature; bh=IYNA/T8SwiQPcz1b4CrLywjEfP8ocEm4NvLV8lNv8kw=; fh=l1JyyNtwy7PztGq20NSyxMTmnYEiMDxl3eIEMzNcYxU=; b=PqSAMhpSgerYYDyeLYlmITbq5dqwoUuATCshm6YH/bQWwdZZ3Ww2xyqqtAQncfVVlk 6OvEFBSzbKb+sJqat4u9deUfxNmkNUyIGqUUbsWkFKe9U0hMWBF3H2W2Hh9bdTKyqQCU 2mGned4ldDusBfRvA1J+fFTppXztySkhWFu7H9+ebkh9jqQm9A1+2p6Dn065iGIckKsz UFuAnSFfbYlBX3E0o9vrN2IZuqAQB32LpzjJCWWgcnUrnn/W+H0mraWLDwnrXw/sMR2P 8oynFxPn5dttZ5mzyLfvz3v0pDA6qwMx4gKkIq7moqyiSjlrdRjyo7j1GCzrDxhOdkvc 6Yqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b="a2KV8qJ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020aa7de02000000b0051a52a48ed4si10798141edv.156.2023.07.15.02.04.38; Sat, 15 Jul 2023 02:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b="a2KV8qJ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbjGOIRF (ORCPT + 99 others); Sat, 15 Jul 2023 04:17:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjGOIRE (ORCPT ); Sat, 15 Jul 2023 04:17:04 -0400 Received: from out203-205-221-240.mail.qq.com (out203-205-221-240.mail.qq.com [203.205.221.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD4A3A8E for ; Sat, 15 Jul 2023 01:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1689409019; bh=IYNA/T8SwiQPcz1b4CrLywjEfP8ocEm4NvLV8lNv8kw=; h=From:To:Cc:Subject:Date; b=a2KV8qJ/rZstBzEyA8bb5wjb0f/kT13+dgI0iua3ubOBo7RA1CjoioH4GaOW27rcS Ew7gvnsMvdGNTIZaO5sOnSb+TQyVDZ86L9HKPo5UbCTY2wqkgbefSKiuZIEVfm617t HeNlXEBpVuOGuwsreWcTX+zW6kzNyYqKHqtz+XxI= Received: from KernelDevBox.byted.org ([180.184.51.40]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id 4391A0B9; Sat, 15 Jul 2023 16:16:57 +0800 X-QQ-mid: xmsmtpt1689409017twy3nsj2q Message-ID: X-QQ-XMAILINFO: MRhkIe3mT0C6m1ATvlVQLha9jUu1RBv3lzuVv1YxAOKDB3WzREnvbushfWNJ4e TPizoQAkpPBgxOsIBCf1fJG9we38ZE0kvpkyObiG9DDQZJ+S/tRdcDNMJUn3ivMKfkSeGGJCd9Ep aOP52SiMeeYENmT8QbcdNN2wPIWxfdKryjv+29RPGpkVgv3hcoZ15umTZBE3iQMZOMVm09IEWv6j qj+tHb/0w6w0gPkbCbtEQv6xEBGtwDz4/0kMTvkhKyRAuDFnNaeqGz0ufSB3MLl3/sWHCTX/3Uu0 IxW58m+Nch/pnUJDTGkzmDWDRIsNyPaJnZTnB8NO62aF0juZtNe+8+yVCs6TdPM/rGmbQ7Rh6vdL eTlj/7dCNVoi40r77ojn1DClMGlrda1uYoOpkYK3h3LU46B7TYro9kS3TpGBjCaNP40akCSmtqL2 Mswu/kozly/H34ojBu1OEoO1pmlvfabOXsrX2HygpqSapV3f3w+KtprXJXuUDCzI+wOBZ90Mjfs9 +p9kNMzJDLw5ptzsz7jpv6316AwOwA3ORm9oICVgMZx2+WnqH9qDRePh19RCaBMgtkQFrWKl7oJ9 2bbx77sMkZe0sFVs3HtfwtpYlg1tMUE2i2ekWgaeS7l4D5YfkjoMUDh5uWkUDZcMTw5tYr4Rv/n1 LZyZdfSACCvqfDPNCpdA/NuHNInwOU9HJyppB6SOXYhiPR3cH45lAZ5Lrua7i6qzctcEEKxcDR8r 8VjhKVWm3P5Yf0ScRmg0jHrG2oebD3WrPe+S4cYTx99lFb9g0lYb0DyYtGYTa9vbFDOKbuiC07BL DI3tFvfuYn3WJOGdexsKemvDBJx3OT8CSD1VBQcKavH0+4F0tdGU1jykxEMslNrfFFx6pEEoiirZ ypOIfSBZgaQxkQuVE+/DAoTU+rexlAl3lZ6GhdX8bESitcRiU3q8TCvmNzK7FpxjyfTaazn0O7cH rMt6jxwjwpx1tZcomNVPgy+DQp7JoD/KQNO9TSG+cw9XZiI5jJs1TeNrciFOGJ2aO2nRmrL+NHM2 OsFI/ZSA== X-QQ-XMRINFO: OD9hHCdaPRBwq3WW+NvGbIU= From: Zhang Shurong To: deller@gmx.de Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Zhang Shurong Subject: [PATCH] fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe Date: Sat, 15 Jul 2023 16:16:56 +0800 X-OQ-MSGID: <20230715081656.1266601-1-zhang_shurong@foxmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code. Fix this by stop calling request_irq() with invalid IRQ #s. Fixes: 1630d85a8312 ("au1200fb: fix hardcoded IRQ") Signed-off-by: Zhang Shurong --- drivers/video/fbdev/au1200fb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 5c232eb13724..c137d6afe484 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c @@ -1732,6 +1732,9 @@ static int au1200fb_drv_probe(struct platform_device *dev) /* Now hook interrupt too */ irq = platform_get_irq(dev, 0); + if (irq < 0) + return irq; + ret = request_irq(irq, au1200fb_handle_irq, IRQF_SHARED, "lcd", (void *)dev); if (ret) { -- 2.30.2