Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1262189pxm; Wed, 23 Feb 2022 22:46:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuYcstkOCBeuljiDWm5gmWeQsxAduPhpUQgyqW613TJhBCigQ2JQIcTYBViiVF1kc50AR8 X-Received: by 2002:a17:907:7613:b0:6d0:ee20:8a37 with SMTP id jx19-20020a170907761300b006d0ee208a37mr1077353ejc.316.1645685181705; Wed, 23 Feb 2022 22:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645685181; cv=none; d=google.com; s=arc-20160816; b=n/9FTOx9A/tg4KQVLZHF43L7NIUscp1hZgQZwZzSkusanFKt80bLxh84BubqbWfzIP HWy7hw6Pt1TCRjaP4DRY5BUfnNm2Dc6mBbWFGNI5NUE/o23SQDKOtTJtYZo8uxW1/Rn2 yxzcGctuQl/923FlI+pD8sktzARiDS7l9HTJLWHL+ULMHIbN+qDlXzGjME06S5uJrg6R RMv+5FxI22Acd46MJne4zZfFnrLeRPrUc0Vd2WdYnlwFzXUg0ZURhAHZnVOu68WtqaKI +tjE/6uhUKaIA0Z3+88lVJFz1KTwA2bYawDReGuX6kmYYl2Jbj22pw+aczlKp+r+LjvT usYg== 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 :message-id:date:subject:cc:to:from; bh=nyYgMXl0e8CiDslbIZ5myYcVQP2DQ8ZY02fAw1Kmjtw=; b=Svx94GD+q2LiJ9oCyg0OsBLgZK/6wwayJK/HLvz1TiOy1O1Q8e7XNejJz15M+LEV4N r+iii8EAE+MRUxhAwPekBrVsZ+iSv30oAqOg3clmkO83dMCv5IMyHcpBomKLQpH+IZfr knlPZxsTwFzR+tS3xTGRLqUCaUy8Yoo4pWxcO0L6v6V/FXf/kRK6cbtCm9l0zHttbDo1 gB0OnzAu4x+ThO5+60gxeQFVNtK0/RZIFnLkHbjJFtpZHDrnA5f2S0dyXr8E/M/aJHoS i+YvtKSmT+ZYPsntICkObp04HCl3SF8hSTHGW+I6+qQxXXgEIajF4570zfppMzt/P6Xa 3obg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14si991463eje.387.2022.02.23.22.45.57; Wed, 23 Feb 2022 22:46:21 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbiBXG33 (ORCPT + 99 others); Thu, 24 Feb 2022 01:29:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbiBXG33 (ORCPT ); Thu, 24 Feb 2022 01:29:29 -0500 Received: from cstnet.cn (smtp23.cstnet.cn [159.226.251.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C215C14A041 for ; Wed, 23 Feb 2022 22:28:57 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-03 (Coremail) with SMTP id rQCowACXn5uiJRdiOWQcAQ--.51557S2; Thu, 24 Feb 2022 14:28:51 +0800 (CST) From: Jiasheng Jiang To: jic23@kernel.org, lars@metafoo.de, tangbin@cmss.chinamobile.com Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] iio: adc: Add check for devm_request_threaded_irq Date: Thu, 24 Feb 2022 14:28:49 +0800 Message-Id: <20220224062849.3280966-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowACXn5uiJRdiOWQcAQ--.51557S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZr43Kw48Gw48Jw4xJF1UJrb_yoWfCrc_Cw 13Awn7XrnIga4vyr12yw13Zr1xAa47Wrn8WF4FyF9Ygry7G343Jry7ZFsxAr4UurWUXa1j gF9xCrWxCF17CjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbzkFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8V AvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUywZ7UUUUU= X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 As the potential failure of the devm_request_threaded_irq(), it should be better to check the return value and return error if fails. Fixes: fa659a40b80b ("iio: adc: twl6030-gpadc: Use devm_* API family") Signed-off-by: Jiasheng Jiang --- drivers/iio/adc/twl6030-gpadc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index afdb59e0b526..d0223e39d59a 100644 --- a/drivers/iio/adc/twl6030-gpadc.c +++ b/drivers/iio/adc/twl6030-gpadc.c @@ -911,6 +911,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) ret = devm_request_threaded_irq(dev, irq, NULL, twl6030_gpadc_irq_handler, IRQF_ONESHOT, "twl6030_gpadc", indio_dev); + if (ret) + return ret; ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK); if (ret < 0) { -- 2.25.1