Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp990541lko; Tue, 13 Jul 2021 14:36:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwj7nBDfq1TQzzIF6MF3QAznKi3UVy2IUezRXDMyxF2j4n7G/NhAM3r7H8N3tQdt1UPKkP X-Received: by 2002:a17:907:6289:: with SMTP id nd9mr8115212ejc.384.1626212207463; Tue, 13 Jul 2021 14:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626212207; cv=none; d=google.com; s=arc-20160816; b=suNPUJmI1L1fXTk2C3bP/SHbsd2dD27BfliZLq7aSm818w+ExIc+ChuZn8w4sSCt6T q1TyGYcq0KZ8thTWBRsEsFxO+3CXlZ/1ZoPA+z4iUnorm1MB5HUL2BYHviBLutUYlZm4 VsOLEqUVM115mLxp1b2JpQHGlbnAcZ06aNLaDZgDW15GqdsMNr9HsqUYuKpqXuSC5kBr ddeMlBRpdBgVVDEqjhnbzoempr196GJmwjhwIUv0ExxhtJQLOM0iCQKT3hP/e5oe89G5 zeFSH/vo4R5KsXo2pDh4AjnK/l3Ib96hfNGhGKzcTCW2HizsvyULvK1hy4QB+dLLnhO1 iLIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DJb6J0QEObgijYOiu1Ky5wE+oRlIvzDRolg8oYJuBfo=; b=ZcfjMpLzF9pZIPG3LvE10Hlyu7mUiHnbyVNyx99oioqM1Qft1+bMxL1F6swi7d15rd CYSywnTU+aquaIXqvbVSmjUHVqiz+vptWSk91nxG28J6OutJwcyyjOFGaM++s/sdwXqb VTTsSkrBqrSbZFyuVBEYx7deLNYnkP1G5TfJxshN+w+VI+TBI1L+v+u6nYP6hHhe/k4b FEYjDvvmLJ11Wqzt6mQSW7M4l1+2DP6UJblyps0FxFI13yWSQcGqumBTamkpNOtqyoe6 chBzwq9SYrdwjNNDMXpJvoxqU6QpI1KfN9MWqYmXMfKxiofARKkQWZ1MtVXYbSybsCV5 nSYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx26si386846ejc.494.2021.07.13.14.36.10; Tue, 13 Jul 2021 14:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235310AbhGMVeU (ORCPT + 99 others); Tue, 13 Jul 2021 17:34:20 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:55140 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbhGMVeU (ORCPT ); Tue, 13 Jul 2021 17:34:20 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id A1E821C0B7A; Tue, 13 Jul 2021 23:31:28 +0200 (CEST) Date: Tue, 13 Jul 2021 23:31:28 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, frank zago , Jonathan Cameron Subject: Re: [PATCH 5.10 073/593] iio: light: tcs3472: do not free unallocated IRQ Message-ID: <20210713213128.GA23770@amd> References: <20210712060843.180606720@linuxfoundation.org> <20210712060851.173417192@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20210712060851.173417192@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > commit 7cd04c863f9e1655d607705455e7714f24451984 upstream. >=20 > Allocating an IRQ is conditional to the IRQ existence, but freeing it > was not. If no IRQ was allocate, the driver would still try to free > IRQ 0. Add the missing checks. >=20 > This fixes the following trace when the driver is removed: >=20 > [ 100.667788] Trying to free already-free IRQ 0 AFAICT this will need more fixing, because IRQ =3D=3D 0 is a valid IRQ. NO_IRQ (aka -1) should be safe to use for "no irq assigned". Best regards, Pavel > +++ b/drivers/iio/light/tcs3472.c > @@ -531,7 +531,8 @@ static int tcs3472_probe(struct i2c_clie > return 0; > =20 > free_irq: > - free_irq(client->irq, indio_dev); > + if (client->irq) > + free_irq(client->irq, indio_dev); > buffer_cleanup: > iio_triggered_buffer_cleanup(indio_dev); > return ret; --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --opJtzjQTFsWo+cga Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmDuBi8ACgkQMOfwapXb+vJSWQCgpLkJMsg1wPPNX2WYjSFsH/GB In0Anj0BCzoFsL0FsXrXnVzAh23MYWrQ =q8U2 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--