From patchwork Fri Apr 9 14:08:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12194251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07B1FC433B4 for ; Fri, 9 Apr 2021 14:11:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C3D060FF1 for ; Fri, 9 Apr 2021 14:11:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C3D060FF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rv8I4NdP6sDYPE7x+dYGREhTNPy6OI9m6qT5o3385s4=; b=Mkzaa5QjXpXwfBU0HfwNKTDk8 7jbKyNCI4SMGYLPT859zoZdVT7UmpXAx9/Gm1JHyHuUvLf0ye+aRCZE9ri9bd8qYPByKiJZmWFc+N CKYKc4OdIBkgaoAExVy1a1IUAE76PSovNKXm+EXHjGmTYJYMsfYM+24P74FRTGQNK3HdKFAW5im4+ lpDSOIyFhxgIh8sciETXIGcJg5oNa5+Ut9owN8UsRz5L3bXbM5vkO9MeE/vv2GZy1zmk5t4dezTDi p9bIfBGRLJBZFem7ROG35pDSruk6EcBgmwjRcekAU/9nuawFHVPt1GOBzskHcWxePK3PSoazivYr4 xG9YmL8ug==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUroj-000sev-2S; Fri, 09 Apr 2021 14:09:01 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroX-000seD-4g for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 14:08:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=H9mhA8VQhVbQm3V3Qs/oEqGLa+ aa5pGDhV1SL54HC3lFBV1nZCMELCELKZh+2v2YPTVQlMQgV5CVrkcVtW5X1fUmt00Glj6nz1lW2dx L9dAZZ/fnRLc4+TB1iuG5L2H8ITPbqHOZuoXgATzADADGapuT0GADACTZacfIp2yl62uEYfoZkGsB Fn0WjV2Z9Rk3E/4oB30D6IlD0Tq4Pced2F7LH0Irr6wWwhMguEASWQo/82kSuQrLGizECKOp1Fsfa h5X4VHkTUCGIrywprNPzrnMmeDDQz9T55WwB1lVFnmI3VYxx9kkG/+EdMivapbZk8FVg09WcI2rJS FNZeE7+A==; Received: from mail-dm6nam12on2085.outbound.protection.outlook.com ([40.107.243.85] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroU-004ZZ8-Ht for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 14:08:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iuqrnzfyagxA7yOGfAafTPCMJgx4Gcj+tXvQabJmVzsytVEMYk59P04Jn7nhrF9Ia69FMOEjy4QI4ApfknQNC8rl8KEQkRjl+xADCtOvK/5qd32SVHpBUegu8fTXpacrLT0gCelh4ayKzRSCKFnlSZ4pPIYutXxZzDcttrb9bmxtK9jwNm4cwgoSmlMpboFWDqLFzWUcQOemfIwuXrVrCz/ys1X/3MHxy0blFURtRgSx9kPCLme+po/tJxrNP0iCMxHa/iPjET3B7Px6frWeeimLo+u9ErZ9woh1FlUTUQ6Z4kLqwOBZ4CCeipfwky0j1ZaSfHtPSWlw7cRa4MbJFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=arXMysgRy5eDovWx8qzH71Lo0SKz2CjCtgoloK0H+5kOASc3BDkKxqeT/r2NLeFVHmbve7Yr8rPQLifs11bCNQUUpHl0DkxTvuuSMdQ5+/9BAm9f3S8qRqbTG+GWCj9ry0ihdrFjiWIXa1V9h8AfX8as7dZ1l6ys51BXbdBYVcZZTIUxHgs1+gkOYhNR5BYbjyLYBra8hSRRqIjp1sYAmFtWZXdVpkqPJVy/YSXMsgMVCaRh+Z2Z4Z/XI2bZzvY1NzWt8S/JLYJGoWL/jV15rQsaD7grV1TzcKUTECYy8Iy47P36VFjGSai3qOZ5zpgB2GQ19r2EmI07bmH5tONCqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=ALOeYLhkxfDyXCZIIZJhZCFmyEkqM/Y2pZS90hFhJWY7/9V9uYfLY3hlTePrBV8He4ieX2lxf6H7oCF+zUBum0vQ4g/+toeof+A3j6C4WIDr93fkb+2molY7Hz2PMSotc0EpvXI+R76oPQmKFk+qVKXtTDAeLcCwZLW14yb3Pw4= Received: from CY4PR16CA0019.namprd16.prod.outlook.com (2603:10b6:903:102::29) by BYAPR02MB4503.namprd02.prod.outlook.com (2603:10b6:a03:56::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16; Fri, 9 Apr 2021 14:08:38 +0000 Received: from CY1NAM02FT058.eop-nam02.prod.protection.outlook.com (2603:10b6:903:102:cafe::21) by CY4PR16CA0019.outlook.office365.com (2603:10b6:903:102::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT058.mail.protection.outlook.com (10.152.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:37 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 07:08:22 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Fri, 9 Apr 2021 07:08:22 -0700 Received: from [172.23.80.241] (port=38546 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lUro4-0005KB-IS; Fri, 09 Apr 2021 07:08:21 -0700 From: Srinivas Neeli To: , , , , CC: , , , , Srinivas Neeli Subject: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code Date: Fri, 9 Apr 2021 19:38:04 +0530 Message-ID: <20210409140806.31824-2-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210409140806.31824-1-srinivas.neeli@xilinx.com> References: <20210409140806.31824-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 888a38d7-70d1-4f7a-1af4-08d8fb60f8a5 X-MS-TrafficTypeDiagnostic: BYAPR02MB4503: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:497; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dKx85zHmvXcAGLC4otbgsommMTxFOpKkpa1YnNH2naLHOMg3DlxWZ0R6wghFFhM4svCEvBD2BVnItdYR4gVlD5VoFtfMDx+ncYHb/3izZKZxkV9Yn2TFDlBsXr2YFt08WAAWqNYFg4dCjjauEOoJlTJc7J6UumcDufzfj7Fe6KaR0XeBSc5fOT+8xH/F9KdARTikg9b7DjmLAhLmkJ4FRKT2tVKCyU7NOqd5M2XfFuomvh/rH9/+uYeMwiSPIB6YdmhUG0gD92SEYLea6aaQWvbDsx6n63iO2apImS/zSQFb5JRmtQOfovbQu4S69dqrBSIy46QhIaFhamA8C3n1pl1NpDhXviSy1VcVjzmuS2yUgaNtYJpvtPlD/FuSF9x1mYVU6WZVg1fO1R7/3VFzhh9y7Ca351NLjfV6JhEqfTaD0rghfejGgdAmcvRVBBzzQjSFyV7Jbh31YYRMoKYbKdCzWHZJZokv4bAlfcDOEr49Xft/jrudpscXhE3CROErp6RFhkQpB1x8hYEelJgB5l4DZ7+bMs2NQhw0Av9SlcDuGVn0QtFxJSc9hANzNGs4xukJ/srWHDIzumgpYSZ5iWphgWllmB9XojDLq3kQQ7hmXbU8bDufVT/y0iJPvRuizg/aSizfGyPHE0kSR8yAQf5rkq1VRZC/yJDsabaup8dbbHdspSgGiE/iDgoJeDLL X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(136003)(39860400002)(396003)(346002)(46966006)(36840700001)(83380400001)(1076003)(8936002)(2906002)(7636003)(356005)(70206006)(36756003)(47076005)(36860700001)(7696005)(9786002)(6636002)(4326008)(70586007)(336012)(316002)(107886003)(36906005)(82310400003)(44832011)(186003)(8676002)(2616005)(478600001)(54906003)(82740400003)(110136005)(6666004)(426003)(26005)(5660300002)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2021 14:08:37.9287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 888a38d7-70d1-4f7a-1af4-08d8fb60f8a5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT058.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4503 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_070846_612890_ACB9C373 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. 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 module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Srinivas Neeli --- drivers/gpio/gpio-zynq.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 3521c1dc3ac0..bb1ac0c5cf26 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver = { .remove = zynq_gpio_remove, }; -/** - * zynq_gpio_init - Initial driver registration call - * - * Return: value from platform_driver_register - */ -static int __init zynq_gpio_init(void) -{ - return platform_driver_register(&zynq_gpio_driver); -} -postcore_initcall(zynq_gpio_init); - -static void __exit zynq_gpio_exit(void) -{ - platform_driver_unregister(&zynq_gpio_driver); -} -module_exit(zynq_gpio_exit); +module_platform_driver(zynq_gpio_driver); MODULE_AUTHOR("Xilinx Inc."); MODULE_DESCRIPTION("Zynq GPIO driver"); From patchwork Fri Apr 9 14:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12194255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D65BC433B4 for ; Fri, 9 Apr 2021 14:11:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E48E261007 for ; Fri, 9 Apr 2021 14:11:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E48E261007 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vG/PUPe5Na3Oz5aHsUR+s6YH+G8AVNZZlhjp5Tz1CxI=; b=X/rEdjhoTI9/x0Z7O8YPFQQUO xcNtrL+hqUqbfec0ikRODLaHRnhOhUSU942Ji4/bVVydpEO3Pv1tQBwgWywTQpR04TecqDi3SwfWx TPEWIzjJMoK3wrbhIcj7EEZ1G3si/knPP5qsgbjz9lA6Z6FTa9ylJCJPTRFzOGPYaHvI7X+BBEqar a8SitdmzVIw+tlvGDDseHg+y/I0N8rVk/Ae7ALooCUjsxZbuHTz2Fzj7Fna2WTAao9s0Ov/GC7OAQ QOmNbn1JFEqYY7wiLmLbGPs/sIxYD6RCscgYoXuLhrDwUGHggd8Dds6CJ5Ya/cFHa2ZrLD+GZ/eeu F/MeMGoig==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUrp2-000sh3-T6; Fri, 09 Apr 2021 14:09:21 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUrob-000sed-Oq for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 14:08:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YhK+TtMuJsUx2jnPqGZBZ/tD9kAKlYS3EoOa6faW+Dk=; b=qOLJ6d2KJFQd+rAeWxqKyOvPSa kZaJDXpSHYyHhw4ZayjzsqlGxenDAm4+y4OTDPgFdDGiSvZoyWsaPrZ8iNnh7/3xnkoc3GHSRTH0D 74D+M9w9o90SnyF55iryf5lUCWU/5m0Lq1Cw0hGMpSdMwRZmRwhJBI9KX6/VtWggNcieTb8SnqKWk DsOL8jY/mIrstOQQwpZedZWVmgh2EI+P7kPKofTqd15v4zBOaD24ARz7PtyXbLzKRQWlrtL7bOjdm lBq48Eh4PxpLFiz35ub4A3Xjca1xAvDrGEzbHzvFXsRAk8foK4EL3kOTTXPpOrEdtSX40yCCdwSMn Db11OLrA==; Received: from mail-co1nam11on2057.outbound.protection.outlook.com ([40.107.220.57] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroZ-004ZaV-CC for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 14:08:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GxpPiHZ9Rd69Un0A42RW/U33zS8QkuJ94ZEcNVnSmwhrHiRoxc5i+QpbWq6CFPmWI5dr/5j0ZCnJP97eg0qWoDMiqBgTfHR8ARtkxpXUiIcETHyBvGpirfq6ng/mkRIVf5KNwU7n0eanksdc+rQYigMBpAIXdd83UWILE+vMPioH3XROpS3uIibQQ3YDiO2sVUdelv3mKDuCjTpF9JCjAhx0eMlDaY8tUgti5dT+tS8k+zdxCfSAvq5/WxP8DScDBED/6UCjQjKnhddJZfLlbYgU0/grJDkKXVEZRtSAKdplL9avKkcOjrXriPyblkKApdmT4yN5ib9DzFgBDkc07A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YhK+TtMuJsUx2jnPqGZBZ/tD9kAKlYS3EoOa6faW+Dk=; b=nhOUukpvq2dWRxDzomh+i3/frIxrpFfyCNZERqaaWwbXhhT5LbqQxEZ614/40A2AbCNgjoLi5KBg4f/RnW2jgIx+zAB5kHkj5gcedPqp9OBoDLaziCV3tbHHSJpKFPSsrIs+/UTpKnhrVpZLphEzgj2wtgQlt80yRLEyBk6w8y8vp+JNSEjg7g9VWVurLi80cqP6PygydVlBObKTQ7PU6Zl4hgx4vKVKzXIhVXKQIBE23F7p0sk1nRmGGBk65aJKo/LrPP0iI/X5/nH9fH/ftxUZ8UA+YzeXsgnpU97dtm89CuOriN4WaBgAoxq4NM0ZXMBsfuQJONTq2LsHHFA1zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YhK+TtMuJsUx2jnPqGZBZ/tD9kAKlYS3EoOa6faW+Dk=; b=HrSMbmocx4glAl6jP5IQU0+sLVXmwNspytPZVhql6vKNS1rdG30gUCcBOf41gumoCCvP84dPJsgF4ULdL+crST/VARXyFRFyE13aQtLAdxvshaUp/JzghzsT6SRufRxS5+PGbzKhDB4T60CPtxyh8T3+SUQfWGp5WAoQZ/V7bz4= Received: from DM6PR04CA0015.namprd04.prod.outlook.com (2603:10b6:5:334::20) by BL0PR02MB3777.namprd02.prod.outlook.com (2603:10b6:207:4a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Fri, 9 Apr 2021 14:08:42 +0000 Received: from CY1NAM02FT039.eop-nam02.prod.protection.outlook.com (2603:10b6:5:334:cafe::e9) by DM6PR04CA0015.outlook.office365.com (2603:10b6:5:334::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT039.mail.protection.outlook.com (10.152.75.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:42 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 07:08:25 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Fri, 9 Apr 2021 07:08:25 -0700 Received: from [172.23.80.241] (port=38546 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lUro7-0005KB-Sg; Fri, 09 Apr 2021 07:08:24 -0700 From: Srinivas Neeli To: , , , , CC: , , , , Srinivas Neeli Subject: [PATCH 2/3] gpio: zynq: Check return value of pm_runtime_get_sync Date: Fri, 9 Apr 2021 19:38:05 +0530 Message-ID: <20210409140806.31824-3-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210409140806.31824-1-srinivas.neeli@xilinx.com> References: <20210409140806.31824-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e8cd944-7102-4e13-60cd-08d8fb60fb61 X-MS-TrafficTypeDiagnostic: BL0PR02MB3777: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xtsoLGqDWl30I5vPgGJw15wny5Ea1bVfbKeKLds5lnnznaHZ6S6UxTbiYFGCNNbTsMWJkutZxenTEOGa508kYOAD58rFz5nQJhK32gHui60JGmQJ7dFmA5PzlAjEOpK4gGQSo5RdW+vROAZg5q1vZXPdgJRuSLEYQsH8hZxKm22Ow4woXJnYEVBr5B/MpdyU4949xjbCJTNgOnuyQPRyZ3cPX9DlUQmEVl++RkjMn4xxe6trIJLcNpvA6FgNfCnFjrTgDMBL/6j2xDMufNKFiAm3Di8MzWcmkdAwfTVLRPbYWKdLQ5xFJwhoqjawQIVZ7TfMhpAHBH1PMl5CgCHofmDIC6uvJx2zMARRAZDik/ppUTmFXjP3bxOtzxjZHzaThmiw+Tdt6aJ108VimFqQZ0fEjW5JrbRiX4F5mjnYskTvaU+6n3kP/uQLaMJximhFKvDGQeojQuFHQNOIs0AgH1nKSLepggPgKWPmSPL5lsovoIad+vvW0JrPWDMX+l46HOObhAEcqc33PQPw5WkrBNF3fcKcTixAXREXlSA417rxB+XZ9cMTYQOHiJ2lrUdnQQkcyRTCm9jNQWmXCRKVj8iWZjGytcZeX8YJm0wyakhM/ogsXzk4F/2glu+P+pikHbzF4O4fvxw0ipR0qSxH1vdjxjb0nqSGs7/KC6aOo+JhRmeFTdO2D8d/jU9ETwT+ X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(39860400002)(376002)(136003)(396003)(346002)(46966006)(36840700001)(8676002)(36860700001)(316002)(47076005)(356005)(54906003)(6636002)(5660300002)(4744005)(83380400001)(7636003)(70586007)(9786002)(478600001)(110136005)(70206006)(26005)(1076003)(107886003)(2616005)(82310400003)(82740400003)(4326008)(7696005)(186003)(8936002)(36906005)(6666004)(336012)(44832011)(2906002)(36756003)(426003)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2021 14:08:42.5201 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e8cd944-7102-4e13-60cd-08d8fb60fb61 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT039.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB3777 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_070851_436089_2ED2BF58 X-CRM114-Status: GOOD ( 11.65 ) 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 Return value of "pm_runtime_get_sync" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any warning. Addresses-Coverity: "check_return" Signed-off-by: Srinivas Neeli --- drivers/gpio/gpio-zynq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index bb1ac0c5cf26..c91302a16c77 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -1001,8 +1001,11 @@ static int zynq_gpio_probe(struct platform_device *pdev) static int zynq_gpio_remove(struct platform_device *pdev) { struct zynq_gpio *gpio = platform_get_drvdata(pdev); + int ret; - pm_runtime_get_sync(&pdev->dev); + ret = pm_runtime_get_sync(&pdev->dev); + if (ret < 0) + dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n"); gpiochip_remove(&gpio->chip); clk_disable_unprepare(gpio->clk); device_set_wakeup_capable(&pdev->dev, 0); From patchwork Fri Apr 9 14:08:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12194253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EFFBC433B4 for ; Fri, 9 Apr 2021 14:11:24 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECB5061007 for ; Fri, 9 Apr 2021 14:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECB5061007 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NnyLrbuS+iCXN855eon+yHF50MY/DyK91eX/TDg3730=; b=pzTv3g28XGMeKn95OtWe2OHqp N1XSX6aDPTLx7snmDX2tb33/FQtXW/DolZEDSEvNhYoc81uuYzdx6R9fs9wucly7a7SJekRe9ijbT f2BtrgPeimr7GtQVm/rvZ/kEm5wSy3NGgLGMj7KHCMSaxLePcvDvhzf5HvpVeggBX0GXM4ZqHQLcr m283/fAjGYfZVpAXA+GhCTusQgBnWEdpMNV41kZBylKrPJbFiYlHqzK/9PuKaG1Jh5L1gz85hWGos 3mD/CSuSTPy3fbovbqs3hA0jYu3tS9vzYHVkCdXBAkZ9JkM+hZjCd0kxNWnl4FbhEt/Y2OizetLcA 3XAytdPxQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUrot-000sfc-Sx; Fri, 09 Apr 2021 14:09:12 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroZ-000seN-0R for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 14:08:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wcX+I0oO6tCUrm3FHhb5h5u/UXaWk6B32HUO9NKx/YY=; b=F6thcQoqxEqg88W4QjvQfyw/ZC g2/tLuQx41cYpkfGRpqwJgYKvbSh5qWM+vQHBzNW/nZG/FkY6M74vlTvga3UUXbEjWYaFLnDTwpf3 IYC+uEh4gNmPCVESiFOVNrFeKP3LJmbuUszt39ViXEd+anqRq0YmmUasu5yYcj5Z4p0XqKnkeaB5D qANNimFq2gmHfY5DIAOfwiS4cVhXJvq/cAU55f/nNyIFmBGjCNqhRfeUOZPYhEtZiTM5yQRF4YScU Bg3pcW//lma1DU7zxLSSuvdiB3ad6vByZ9ezxBl78IEImnooToa6DWRDX9at9uHx8iGakbi3zD56W 0WlUoIBw==; Received: from mail-mw2nam12on2060.outbound.protection.outlook.com ([40.107.244.60] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroW-004ZZn-CX for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 14:08:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mYiav54/wgqliTo0qmYs9q0ZeaeavGo5EYyJNIxbBDtYPPt9yrjFYNborvlZcwppLyMtkKoigz+xG3WeW+Q4yTGAR9Gh1yOLftcnzvgoDwitfPXcaJM1ehDsiX+tGnt6KPrejwXc9QnhvhoifrHkfTBQ1RMz9IPjT/pusJqtsntK924ODWNbAcYO7nYVMv9qp18l8dlkIEkLCH90TVG6H0WwVSML+ZI8zs5nylrg5DcwJRBD1oXm/sLl4o1HnMcBUilD93IPQrygdaAA5jsdnVu6sJ+AtUNiNOdm9PK7DGaPacKJW1NnzIFekITJvay1zpZnacOHCZYkLKoLX66QxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wcX+I0oO6tCUrm3FHhb5h5u/UXaWk6B32HUO9NKx/YY=; b=BXwxroabjoPuueUkkt/yrRTPnIhFlQxn6Eo8OM/MyWFH5ruWjSeTRwcUQXfC0VZmOmptbu2J5hyPhivlrivVK9Ks2i/QB2zHcN0rMXnDe+EdHzHlv2A1nlEFMnrbsQldI1xcmYf+yV9FfuQ2nYBKzmP/B/AtciS9+8exPJ+kX7G+JvXC5Q8SvvDOitWvXCXWEOCj3N3hJab3S2UhAcBML8l59bUvPyE5zJ9mNKTOgYJALuGWQsS237hsGpRaRuxXveuEVzQbW2zXuR41kwwL341d1Ilj8BRtf/d2iGzZwWRqFp40ZK8VSKjqYiNMeUb1FhtU2Qp85qM9waIYFB5KoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wcX+I0oO6tCUrm3FHhb5h5u/UXaWk6B32HUO9NKx/YY=; b=mGCSOH7VuIdjYK4/4q6b8ZkxwbjfKb5b4i3MGl5tZCtP/Sv2jSP1jH2juTF63/8cq6hRtnCyBfCIzwnRCleZN8O4do5mNkBr8dN1C2tZTiSn+LfnmLch8qLP0BuP/pE+f9aoJ2wfwduqkt8g0UWGccmN2A6NmO/314aVHZ/O1Sg= Received: from CY4PR18CA0063.namprd18.prod.outlook.com (2603:10b6:903:13f::25) by SN6PR02MB5055.namprd02.prod.outlook.com (2603:10b6:805:67::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Fri, 9 Apr 2021 14:08:37 +0000 Received: from CY1NAM02FT055.eop-nam02.prod.protection.outlook.com (2603:10b6:903:13f:cafe::b6) by CY4PR18CA0063.outlook.office365.com (2603:10b6:903:13f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT055.mail.protection.outlook.com (10.152.74.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:37 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 07:08:28 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Fri, 9 Apr 2021 07:08:28 -0700 Received: from [172.23.80.241] (port=38546 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lUroB-0005KB-6s; Fri, 09 Apr 2021 07:08:27 -0700 From: Srinivas Neeli To: , , , , CC: , , , , Srinivas Neeli Subject: [PATCH 3/3] gpio: zynq: Check return value of irq_get_irq_data Date: Fri, 9 Apr 2021 19:38:06 +0530 Message-ID: <20210409140806.31824-4-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210409140806.31824-1-srinivas.neeli@xilinx.com> References: <20210409140806.31824-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f24e1bc3-dec6-4583-8e1f-08d8fb60f85c X-MS-TrafficTypeDiagnostic: SN6PR02MB5055: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JnGIdhXZQYcmCcdM6wvBQN8j9XkpSd3WMUHeSDVWgKnDFizENX5rluAYrEMWhnfnrKd62SISH/5HHXICWxI/3VZjxQWxeoE+9pTleWqsrhZclZeUTujD06xUVuwjUF+xKRZr8Iwa/170+2xQsMNBmIBIi7J26TkHueO5NbeqZuaJqjLL5SiMTxcqnckgsweUeOhX75dp4ujzQD24NN44t97/fMx1nrXou/DAJt6XS2xQR/Wbh30FqibUa3XnO3m3bI338/pmVUnDs4nuaBGoTiSLicQCjhDTyYO9FkCZCJW/ZEJ9KHhn7tNLEjiyFA8/kHCaylLHWtxRHa/N24JBSQwhUSo+LqbY1WBk+X7YV+fRzgnuR4eDPu58U2duHV8+o/7+63PC7RdBeoP9UpvMp6Wrhrigh50AzpU7o/kgYJaeTBXuTKRQnO71H66OKWJxM/926pbzdAzAc9vjr6LUy+O043afw1jiEhVlJ5yPY8+U9znzjcOrfAIZpgOUkiohQEzubSgb9s3EttRaryHHmNY4IJJlmTwafjTncSk/+2eUtKqLX2uC/+bM6OlsMgkUZ2hCxymnQ8oDD4QsW94Zr26nk5nBS2mJZmbYh3JLKtMRT570RTU2zC2grxF9mv5WTBUABrMLcIYCua0KqdCBAoMd/rwM1xnwU9HIUAwJEkl36LZiUCXgiZV0YmO7kAyX X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(396003)(376002)(36840700001)(46966006)(107886003)(44832011)(4326008)(356005)(83380400001)(1076003)(36756003)(82740400003)(7636003)(2616005)(8936002)(110136005)(316002)(54906003)(9786002)(36906005)(6636002)(5660300002)(7696005)(6666004)(8676002)(478600001)(36860700001)(82310400003)(47076005)(186003)(426003)(336012)(70206006)(2906002)(26005)(70586007)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2021 14:08:37.4543 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f24e1bc3-dec6-4583-8e1f-08d8fb60f85c X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT055.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB5055 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_070848_447031_D6EF05D6 X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. 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 In two different instances the return value of "irq_get_irq_data" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any error. Addresses-Coverity: "returned_null" Signed-off-by: Srinivas Neeli --- drivers/gpio/gpio-zynq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index c91302a16c77..f0cb8ccd03ed 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -736,6 +736,11 @@ static int __maybe_unused zynq_gpio_suspend(struct device *dev) struct zynq_gpio *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); + if (!data) { + dev_err(dev, "irq_get_irq_data() failed\n"); + return -EINVAL; + } + if (!device_may_wakeup(dev)) disable_irq(gpio->irq); @@ -753,6 +758,11 @@ static int __maybe_unused zynq_gpio_resume(struct device *dev) struct irq_data *data = irq_get_irq_data(gpio->irq); int ret; + if (!data) { + dev_err(dev, "irq_get_irq_data() failed\n"); + return -EINVAL; + } + if (!device_may_wakeup(dev)) enable_irq(gpio->irq);