From patchwork Fri Jul 5 10:40:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13724924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E36C0C30658 for ; Fri, 5 Jul 2024 10:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=z1J4iEQb6bCrjMnr51kApYhZFe/dUsW9qOMreFh854I=; b=HQ3gUqUTLmgWfa YN4TtT8S/UXbElZtLIZ9PWRYwvxxdRvIcs9pB4ru7dm8DPCD0CAR6PL4nZZFkC/QiyK/8UvoeY+Np OuSAl6L46UjuRHbpmijjcndziDxkagm29Dd3njGxouC42wQLhB3khoCDi4oeqvkCZyaBCS7MvRYOB zp72X8q1ZuduY7cC1nxYxw08X6PuRKPiDuUo6xTXT/0bY6rLPI0jbcFZZD0dRqeTfwWnNXF1LyHiE YcZGV9vLUw7521r3GMp9dhoGRB70hsMMDibPpw9e5ivFDbt+KRNqZhrB4/T53+FeuuIg3jO9MTwgX Z36lx1uHLdbNGuVNHj4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPgNJ-0000000FfnV-08AA; Fri, 05 Jul 2024 10:41:09 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPgN4-0000000FfjT-3QrE for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2024 10:40:56 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ee7885aa5fso15973781fa.1 for ; Fri, 05 Jul 2024 03:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720176053; x=1720780853; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=z1J4iEQb6bCrjMnr51kApYhZFe/dUsW9qOMreFh854I=; b=VwRws8jvZ0iguN3dEgL/8y8Az6su1s6JAZ2LqXFqhPTojgfwu2d6UPGcxCGLy5JUqh M5N3o7BEQb03UAWWzzpM719tGoGZIMefg7O5M61p27Ui9IQ4gf1ZTjRy5Z5V2xHStbZl evtXISUOCHQmhqt+AICtWQ3YO+0WaM47UcR5Iq4QuaRMKgTgMkeim+XrgvxUbC1ygQRa zo9Yoo5ifd9CPBd7pmd17t+hsfVPbwkvu+rENqLGdPS3GLHcQPOLVqUHT5rDPyM8GWJh vTQCRj8OsCrjNhAPQX0qcfOLZp2O4tJSoPK9nHSndTC4WPVjowTzj2RBAo5oQT7Syacu C+ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720176053; x=1720780853; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z1J4iEQb6bCrjMnr51kApYhZFe/dUsW9qOMreFh854I=; b=AEokYoEkT4QRAWvoiChJMgZSxY8UyWlqvYRcAhsD+PQwl5aeSdzqzGi3DxY+/3id88 KH60CYqs6uOfiprJCsX72f6gsmHO6kbVrlE0mIkdRN+N0Dgb37Vd9GRgp354XB/tM5Uj m1OTP/oS7BA7K+X2jNDuKzSehLZMBKj2eOkKDQDc+oY4x+akvFU+5v5cS1+iIK2y8n3O wcR2HcUzjmsc8+vBYdPdBhdo0VK9uwDPsIseLs9pGymCZ8Kx2+oTIbb4+V21Ig0RapYP XQl1wvTwG8Wtk5foQI9RkpfXxBOHlChnwxqcN+3tjValTO8ozuUvQtTqGnMP2FnCL3Qc 12eg== X-Forwarded-Encrypted: i=1; AJvYcCUgeWcAyAkYTDEet4TZJUprE6ynNe9I2eqEiZv2lOFbJjNLOGZupOf11sK1njTPJcW9Stw1MUJoDHd/YMuJq1DhdUGL8X/i47ptnBAYh5dXTa1zRqY= X-Gm-Message-State: AOJu0Yx7mnsTcbzi94B2BSXXJBJUHm0QRuLhnU81e9Md24hnsMNhqbG7 X0/Jgt3+4VA8sdNeZTh77ERKSpH/dzRzMofhoDr+ZQV9bwQ7O6F7EURCdVhhe3Y= X-Google-Smtp-Source: AGHT+IHQnQG+cHJkwbA5epHZ0FILVGUAdo3ot8LEwDFf8erj1Ucgf8Ixfx9Xs2w38g8/S45HM3b8hg== X-Received: by 2002:a2e:2c0b:0:b0:2ec:5b10:685a with SMTP id 38308e7fff4ca-2ee8ed8847bmr27194401fa.17.1720176052935; Fri, 05 Jul 2024 03:40:52 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36789d5ec1csm8680446f8f.37.2024.07.05.03.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 03:40:52 -0700 (PDT) From: Krzysztof Kozlowski Subject: [PATCH 0/6] iio: adc: simplify with cleanup.h Date: Fri, 05 Jul 2024 12:40:43 +0200 Message-Id: <20240705-cleanup-h-iio-v1-0-77114c7e84c5@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAKvNh2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDcwNT3eSc1MS80gLdDN3MzHzdZEuD5ERjCwsz00QTJaCegqLUtMwKsHn RsbW1AA/2SvRfAAAA To: Dan Robertson , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Oleksij Rempel , kernel@pengutronix.de Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1044; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=RkNmPr60yh76Qvmt5J3LbD5Vz6H4ie67KM+JSqZsdJQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmh82sbNnREpGcwlzyajdyO8SZdwcgSZD3Agco5 hqT32RjHOuJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZofNrAAKCRDBN2bmhouD 17KdD/42XrKF7DuAE6Qdhii4RVQMwatwwhx5n1mY6q6ruXvovznXxSiT61bn00AbSdnOb9MYyXp qrAizgl7gr9D69aC11h8pHMyrypgGvP3lXOyG+kEDmZJ1mR7KaSLRuYJW3/NsUcvaWKblblfkYC /pS/3s2zRqXSIORLiyJoOelf1yyMRLUHIic5ZG5qYI5VNj+/pwsOq65RZPWfNknxuBYFS/GBqzo ATZFIXPLAI3nZNMRKtCF/CJWTJan/noKP3PELHBoTOecvIkTl0qoOF9bjAvH39yPmRfY9pbkPft yErIvFzNTtzJTqB3TU/fquqnwm/NUiIqYWqcpWtQMFtEgl2tOEf708I1LCmwSuQF+XZ7KAw9cya /nhwiVaWGf3p9HS8afO8x611ce6GCLcPTz5XA02ycFSRZ8ZWVJnAtu+HOfEw04vpxzXCThscBrg jDWrB9NVsYEt4m95xaD6VisytNGujfOvLfqSEzXff1k8UFbilxkSCr8gHhbf0EX2tBUfPxb8N+7 KWBCQvgx2xbB12Nh8FMrluSlPt2Wlkh8oCFsn0oSeKsOjidCoOL/kiAAWvaePGsu8HZBVeAfqvF XCMHJZHjkZK0fkoAbGkVM+xLgl6wPcBBQ2uSUU3t4YR06JCykF5c6VyeuoyPx7Y2j15kNfzAF/4 ic/t80HvjjYGeBw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240705_034054_896827_2D7642DC X-CRM114-Status: UNSURE ( 7.72 ) 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 Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Best regards, Krzysztof --- Krzysztof Kozlowski (6): iio: accel: bma400: simplify with cleanup.h iio: adc: ad7280a: simplify with cleanup.h iio: adc: at91: simplify with cleanup.h iio: adc: max1363: simplify with cleanup.h iio: adc: ti-tsc2046: simplify with cleanup.h iio: adc: ad5755: drop redundant devm_kfree() drivers/iio/accel/bma400_core.c | 11 +++++------ drivers/iio/adc/ad7280a.c | 10 ++++------ drivers/iio/adc/at91_adc.c | 13 +++++-------- drivers/iio/adc/max1363.c | 34 +++++++++++++--------------------- drivers/iio/adc/ti-tsc2046.c | 29 ++++++++++++----------------- drivers/iio/dac/ad5755.c | 1 - 6 files changed, 39 insertions(+), 59 deletions(-) --- base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233 change-id: 20240705-cleanup-h-iio-c90ca38865a4 Best regards,