From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F6DA374722 for ; Sun, 29 Mar 2026 13:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774790316; cv=none; b=lM/+P2KAmsng+0zpvfjuGifq0kvvnNfhaFeOuOsOSCUYKkbRoc0A+aAr5kS4v31b7g6zGEmwju72m87VufeJhkASav1Zgh/dcUcwjdkpT7lQq+LbbnVNckeXZdIMAvuzvAC9B0vB+SpnL8pfarI1vtjJiOWks42OhxtEOOmwFxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774790316; c=relaxed/simple; bh=jwiCbUNmbH133CB+K6I8qTQqlGYRaU2q+uqGO7Y7L1M=; h=Subject:To:From:Date:Message-ID:MIME-Version:Content-Type; b=raAg7cYK9ABnWXdqW/Nj8zleWgt/q8C0QZbpZbRwdDRwz33kpCDDvKPS+5oLvFMWJO1wx+ydoamKgbp1dhRswZV/cGMglkd7MAgCCxFCwo8sNTdgawUngFtj1hLcXbyjCEmIIze7t87mhZQgbAU8D1al7oeTaa/Kh0U/by43Ogg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dkDt1qkD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dkDt1qkD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5B59C116C6; Sun, 29 Mar 2026 13:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774790316; bh=jwiCbUNmbH133CB+K6I8qTQqlGYRaU2q+uqGO7Y7L1M=; h=Subject:To:From:Date:From; b=dkDt1qkDlcRsYikP2GzKeNAJV/Gzp2wQp9iwW8RjteHT6HCrLQnYyCeyvUXlUjryC Rjj8FkQ1PkYaNN1y/d8+2jltWZu9jyief3BlujOFTcf2phYPARNO8S7nGDElhp3nKc mNXE04Sy1w7UQqLyg/2bgk5EhLtysrwlBQDHDJ78= Subject: patch "iio: gyro: mpu3050: Fix irq resource leak" added to char-misc-linus To: ethantidmore06@gmail.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org,andriy.shevchenko@intel.com,linusw@kernel.org From: Date: Sun, 29 Mar 2026 14:50:11 +0200 Message-ID: <2026032911-seldom-riveter-92ad@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit This is a note to let you know that I've just added the patch titled iio: gyro: mpu3050: Fix irq resource leak to my char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 4216db1043a3be72ef9c2b7b9f393d7fa72496e6 Mon Sep 17 00:00:00 2001 From: Ethan Tidmore Date: Tue, 24 Feb 2026 16:48:16 -0600 Subject: iio: gyro: mpu3050: Fix irq resource leak The interrupt handler is setup but only a few lines down if iio_trigger_register() fails the function returns without properly releasing the handler. Add cleanup goto to resolve resource leak. Detected by Smatch: drivers/iio/gyro/mpu3050-core.c:1128 mpu3050_trigger_probe() warn: 'irq' from request_threaded_irq() not released on lines: 1124. Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope") Reviewed-by: Linus Walleij Signed-off-by: Ethan Tidmore Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/mpu3050-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c index 8df1f524d342..d2f0899ac46b 100644 --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -1129,11 +1129,16 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq) ret = iio_trigger_register(mpu3050->trig); if (ret) - return ret; + goto err_iio_trigger; indio_dev->trig = iio_trigger_get(mpu3050->trig); return 0; + +err_iio_trigger: + free_irq(mpu3050->irq, mpu3050->trig); + + return ret; } int mpu3050_common_probe(struct device *dev, -- 2.53.0