From patchwork Tue Dec 3 05:23:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 180702 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1068015ile; Mon, 2 Dec 2019 21:23:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw8A4Guo57paaM1LBFs6aIoTiD8as8/ax0jM/YnT4CEHsrsafFmdCqFb6tBoXMwp0Jusy4A X-Received: by 2002:aca:4e87:: with SMTP id c129mr50718oib.153.1575350634631; Mon, 02 Dec 2019 21:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575350634; cv=none; d=google.com; s=arc-20160816; b=KjavazAZdxSRhMngOK3QQI4APTYeM0YW0koDNmRMbOhFEUjimUpL4qBEx1M/WQcj0N ixf5QZ6EI0MVKk9AoF64u1QuNHMoI2q8I/nNZ09ZbJyiG3WuX4EcSZOmMMhFe2K+AxCd 6HxOI/S1BloW2t4z2f3lBAuZT93Q1lpKeivsZ6Qx0+qbxEz3YLAq20yyIKCoi6/UtQTd 4iAOfDB2z0ThAxup5AGdeGv0GbyY90YGL47GBtCLnUAWEecP02Rk5kusgaT5MlbQntAF OlnolCtc89DEev39stSkdRzu7Hbm3vhTIYUc1vgfcUzCvEC6NSvmq2jwnFWuMqc9TPQK xa+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=dPgz2TLGaXm8AZ5IU/e4WWLoSFiMiQO40kFKZ/olifE=; b=wvhXGr0AtpheaiqNq7KlisBBYXD2DrEeWmnqC+B9e9MXHTkc5ej6h+hBM0joTvi1QQ V03w6wUMabv80cAw93UZY+0fIcr43QYqf8XS5fgHp15tqejxHulf1rfz+sX/mdI+bTrT fgpmUmg9k0Aq3mSbuOkzDS3/cEX+HUarQBi/uBNESn8g67gnZL6Y7y3+2Rx/rJrgTbdh Ub/n59WdVENv2kzUtuLWKfRlbiab1fHS5AEHl9STQ3dFIr6FQ6QmZCeGdSI8iZcdwdPq 47QsAwd8HEd5R6P50cLnobQXyAXSapNI+aLpf2mVqt5ILa06b1qoJOlnhk/iuPFUXRvs a3DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RlW/Wke8"; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si723019otj.109.2019.12.02.21.23.54; Mon, 02 Dec 2019 21:23:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RlW/Wke8"; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbfLCFXw (ORCPT + 10 others); Tue, 3 Dec 2019 00:23:52 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34100 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbfLCFXw (ORCPT ); Tue, 3 Dec 2019 00:23:52 -0500 Received: by mail-pf1-f196.google.com with SMTP id n13so1257429pff.1 for ; Mon, 02 Dec 2019 21:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=dPgz2TLGaXm8AZ5IU/e4WWLoSFiMiQO40kFKZ/olifE=; b=RlW/Wke8DNfq5+TindW3a7DNLR09DVaesqF1xwIrlU7rF0EUhASXBKcdEv9gChCMzZ XYOazRvnQp5BEKikwNaDgdpOXqIZGn3q6lanaKG0VVk49ZOEbdZeDfoipfCq5ELIMQj1 l+zmNmnCi30CeiFDdCpZFNLjVkhEZwrSF5TTeCJsP86nGSsRgQFi17NQBUwsLWN3lPG4 XYVktpX4JahsUhum0NFi75QXwlGDhJzOsawFqpujLOvLJB5PyoyN6ODaS4V7T8uSFZTh //laIC4A0qj7KfbwbD+XBv++Ues5+BnYRmsODvf/kbCaKBOLc+fIzic6drSvmxvM7SDf z2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=dPgz2TLGaXm8AZ5IU/e4WWLoSFiMiQO40kFKZ/olifE=; b=RTj2g5GHQC7RkKx9tLhSv4Jne3rHZ3sQuWZyBPhaUm12g2X9bU7W7asTm05oEit39d IMUP3XPmQKDrlgXnKaeqmhyCuKxGUQmUkS7npWrPnqy4lhymmDxLHkX80g30qderqH2V RltF6pJOyKhTveZ1iBe5xwaF34Rulk/XmI9grfdhYokSetNHOAydeeOL1h1oxN1aP+t/ 5oNWG0dJPHGE52x3bkwa6yLdoV+R6138yIub6i3V5cTSSYFgp27BROXlijsMF47oKRpe w4+GFbsVt5vOx7rKWAwtqloGFY66wOGOJQhl6Zb6q1gqo7JgHQl2lgBrhJywOm9vnRfB tADA== X-Gm-Message-State: APjAAAUvJgdRd9+Z/1zZURrNdf2H+9MygXNKP8fgF56N5Nbx7lbUjG0w 23+VX8DQM8W7+Nmv9CiKHRJCFg== X-Received: by 2002:a63:f006:: with SMTP id k6mr3420716pgh.380.1575350631471; Mon, 02 Dec 2019 21:23:51 -0800 (PST) Received: from localhost ([14.96.109.134]) by smtp.gmail.com with ESMTPSA id f10sm1388888pfd.28.2019.12.02.21.23.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Dec 2019 21:23:51 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Daniel Lezcano , Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v2 4/9] drivers: thermal: tsens: Release device in success path Date: Tue, 3 Dec 2019 10:53:25 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org We don't currently call put_device in case of successfully initialising the device. Allow control to fall thru so we can use same code to put_device and return error. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 2 -- 1 file changed, 2 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 1cbc5a6e5b4fd..e84e94a6f1a73 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -687,8 +687,6 @@ int __init init_common(struct tsens_priv *priv) tsens_enable_irq(priv); tsens_debug_init(op); - return 0; - err_put_device: put_device(&op->dev); return ret;