Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp605431pxb; Tue, 5 Apr 2022 15:43:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqYZBw+c5BtJG+398l4hR/M7kDvOFkDDJCst8sCwNLQOILcUpAFjVs0s4iZiKdxzqWu/ge X-Received: by 2002:a17:90a:a58c:b0:1c9:bc35:6ed9 with SMTP id b12-20020a17090aa58c00b001c9bc356ed9mr6398173pjq.146.1649198582833; Tue, 05 Apr 2022 15:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649198582; cv=none; d=google.com; s=arc-20160816; b=sisH5/I1oI/9U4C7d6TwfBOeKQUw16xatQOFdzEZZmRUTxX3QouvyOr3gUWu6uFT5i F4E2ReTEWapVmpW7Q0sx68TiFEdM/3ByRua6shFt9yuTW+7L6CYhWYKZSUvIF46Ne6hq nOUM1P0JRmOzWlVIVD8QlxJAkMfSXAGTIZ6IyKeWk2WD8SAjav6v+PzhyS+UJWout4hb XgcXNZnqqrn6K4LIcRTg7mtTt2PPBssUQkIE4H4OTW54eVkfBwVK8xg3ODVxKNR0MsJF rSb2croRYBjBAmB47Scu3f2KV+oUcGwt+jIKXMTXWr8zATyRjRVh9M0FgrClEoypZywf K/Zg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=De87yjxlxJKR+/tbfpLS6EgBXeezKY/WqsSXm9QaU14=; b=QSeMOHkgmSEeMYVBkveQjLxSiK9I+Rje4dznlhV8oftBqE8q85td0ewYFJgyqmrnvW yMEKd7gnGwBw43l+OBexbAi9lj4uQffk94EAvQ4vsnNPKNO1DHhQCn+Nw2PAx+8hq47X 6aP/79wEG/pdnaH6BASEFaUEPOarhYvl579FCl4bpMbLlx+rXbmSLuyZwE8nRy2TUjnV abATTl7UNSLcL7Ord9e9qAbfQwMBawXk/kJVm+z7dsiWkbhQdcRAAsKLmleoVjN6yaYt c1VBb5trEv7cKs/KsyD2cq8QcNoDHZ9Fllc7Nq0MEla/nKsg6wY4OJ0XWmWbRFP6ip50 HL3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F0Ok6rA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l21-20020a056a00141500b004fa7853d5dasi15349197pfu.107.2022.04.05.15.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:43:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F0Ok6rA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 326C32B1; Tue, 5 Apr 2022 15:23:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390151AbiDENhR (ORCPT + 99 others); Tue, 5 Apr 2022 09:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242457AbiDEJQR (ORCPT ); Tue, 5 Apr 2022 05:16:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B2ED3720; Tue, 5 Apr 2022 02:01:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 88A32614E4; Tue, 5 Apr 2022 09:01:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 924A3C385A1; Tue, 5 Apr 2022 09:01:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149314; bh=RpHeGB/4TCr70vwntNOFuyfpQZbXqLVJP5A5Q9NI2ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0Ok6rA2FbaKbmxr87GJNURAHLK4u2z6P6nT5XXlblbciklnt8n6pCuNmE6DUqGiC SBzk8uMHcElsGEi4WhdUzZluB9lHgOR/Rn7TX2ntw6Mj+AJ/6M6PagYioPzYXHR36u FvMftACtCEHl4lSMA/JW8cq0hc06+uoBu87op940= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.16 0669/1017] iio: adc: Add check for devm_request_threaded_irq Date: Tue, 5 Apr 2022 09:26:22 +0200 Message-Id: <20220405070414.139507094@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 From: Jiasheng Jiang [ Upstream commit b30537a4cedcacf0ade2f33ebb7610178ed1e7d7 ] 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 Link: https://lore.kernel.org/r/20220224062849.3280966-1-jiasheng@iscas.ac.cn Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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.34.1