Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4589243imm; Tue, 9 Oct 2018 01:54:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV63QYFzcl/zonbszCLvBjgJXrzQeaeRgE5eG0TQH0DD0edIUYZMvE/9yZluCB0sqQqlWVYF+ X-Received: by 2002:a62:1a92:: with SMTP id a140-v6mr28815179pfa.219.1539075240458; Tue, 09 Oct 2018 01:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539075240; cv=none; d=google.com; s=arc-20160816; b=xQvjueCV8j5ifb1E3ospf2dq2g1UL6lP4aaHYbZYTTZVoIH/N4zMExvkSUorlbF8ZE cC45k7xfvi60ocNRBhIW//ZsVoDhTrYDeR+8BOcJMUhmSslaCBz9iFSBG2Sx1I718RrS yg0Gg5iLXR8ykC5lmbBICHf8wrIfDhUFZ8AJarQEteBTuMr0gNilLuOdIFqCcTeye3NI cj1gx9Nn3EpQJb8LV00/Ssqg/vG58sv53Rbi5R3Ef1PISHsipKTQFTYvb3m8sNgD8m4j hexCAwzC1izkuweERIlDSDhhzLmDwzrCMbsA83c273HpEnHHNN5IJB19KHl9RiBTOVsq e8Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3UhzX1sWkt6wCXg3IKpKTKTFMjY1cRkxypCoZjYYLzc=; b=MZBqX0k260og+lOoxZoFpWqrbC82tCZSM4C0FROdOz2eI3BLFz5izRGhoTToeYS8fm 1mFDgO0M8Tzi6ULiZR2MyrgTSsYmwfugwvExrFTLz9oCxtfmsuNMDSoaAq1/mnWcZjyt FnFvDvm7pg1/pFIsTbCxajyX07Ud4VcTk+dV1uUEhO+bKrWsgQNNDjweawlU8LXEnA+1 lnDhPcP6yZysffzSwJO2mm+jYjqyjlh82jQAfVY+N+MeaKkjZrUaX2tMsq+5x2VofLYG 339GE50JyTXs3V5AvOpL6mvdAL1UlLOAlHsyQEpNdg76TP1ORGjaN0Bw8tV0OFE2ugeA kSLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=gUaNQWOu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24-v6si21145115ply.370.2018.10.09.01.53.45; Tue, 09 Oct 2018 01:54:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=gUaNQWOu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbeJIQIt (ORCPT + 99 others); Tue, 9 Oct 2018 12:08:49 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34027 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbeJIQIt (ORCPT ); Tue, 9 Oct 2018 12:08:49 -0400 Received: by mail-pl1-f194.google.com with SMTP id f18-v6so496955plr.1 for ; Tue, 09 Oct 2018 01:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=3UhzX1sWkt6wCXg3IKpKTKTFMjY1cRkxypCoZjYYLzc=; b=gUaNQWOur0ApcwdA/+ALBEFVVI3c0i5QW39kOXQ7UcUzMbEiSHfmvG9TctgN+bC5mz Zv/EQY+3MVKkXgEs+KFc4C4e/d9gcazIQva8G107jwd4NcyvCSH1zVVH8c9A6miGYDGF qOLJ5LdpJ8zJI7QC7t1NxVN5YtN9Cak9afq69IVk7PvzkwTmPHK83jemmJhb7TdN4S2M mJB6eVbKs9I4zIM3VYs8RG49BPK4XmBUOjeeY6wY5KSZM1N9+lgg0nOuhNbqWGoeTKec /cQ/M5gOMudRX2aukxl7i2NWV1XzC62Qcvn7/0b2Zx+I2e/+cumF0V5H/JCTRjKt+9LN RIWw== 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; bh=3UhzX1sWkt6wCXg3IKpKTKTFMjY1cRkxypCoZjYYLzc=; b=QCCqB2EmT/y1I0L0sDGdwveGjz8oiMsIqMgIMR29rtQfXL9+e35kA8DkXjKX5yhGhe apZV7McAWbehIFbT3BUnZqGw3B9dp9bm2ykA1RmQVT0Ef8B/kziM2oaNhYZn6Rikcr07 GGxNC+MspdxpFenOdHJ/vzkSstfTHrBpxJ5Nc7DoSmVRq2EzUK/5qNHjKCw6ZLXYWeyp ZoXArdhPyRqi7JgL1btYWZyQmYZJ0ti6hxg9Y5EYqQwnWyz6dVENnWMx/QV3q8BgiVz8 tJhSKdThfpA0vmQyYCG76Ue9rOoZJZYa25xHnp5NAUWRMURqS9uoy6wbqwx1g/xKVCv3 0DGw== X-Gm-Message-State: ABuFfojf/Qi9VeKHoljlAplzRfavQBbMuWrInG9EJG1LfMQFN1oKbsEy tprWb02kfLU9MeX8Cnk+qgBMpA== X-Received: by 2002:a17:902:6b46:: with SMTP id g6-v6mr26950819plt.19.1539075177981; Tue, 09 Oct 2018 01:52:57 -0700 (PDT) Received: from localhost.localdomain (118-171-131-16.dynamic-ip.hinet.net. [118.171.131.16]) by smtp.gmail.com with ESMTPSA id l10-v6sm35324475pgs.45.2018.10.09.01.52.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 01:52:56 -0700 (PDT) From: Axel Lin To: Mark Brown Cc: pascal paillet , Liam Girdwood , linux-kernel@vger.kernel.org, Axel Lin Subject: [PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode Date: Tue, 9 Oct 2018 16:52:21 +0800 Message-Id: <20181009085221.31137-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin --- drivers/regulator/stpmic1_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c index 96f18083a3b6..e15634edb8ce 100644 --- a/drivers/regulator/stpmic1_regulator.c +++ b/drivers/regulator/stpmic1_regulator.c @@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode) case STPMIC1_BUCK_MODE_LP: return REGULATOR_MODE_STANDBY; default: - return -EINVAL; + return REGULATOR_MODE_INVALID; } } -- 2.17.1