From patchwork Wed Apr 28 14:51:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12229017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7F83C433B4 for ; Wed, 28 Apr 2021 14:52:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE9F861435 for ; Wed, 28 Apr 2021 14:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240349AbhD1Oxm (ORCPT ); Wed, 28 Apr 2021 10:53:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:36082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240275AbhD1Ox3 (ORCPT ); Wed, 28 Apr 2021 10:53:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA62061456; Wed, 28 Apr 2021 14:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619621564; bh=Dz4yuaAkE3G30hsowoZG+/b+CgXUAS8PpNDZLkNm+lU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZX0mpl7M//ITWSgBZLCl23vqF5s2RBkEojQYiSSpy0rGP778niLf1vZz0oLfpxrYS vOuPDOsEkhRSt/HvAQJjXoQ9JAuE/YV3ins38c1TyEYw7KLhZJd2Sk0hPwmSjWKOvC adV903dRVKslctm7I6WYk0crbX6NVHPawVs3mcIA4o6YS0WGU4VN6Qn19uf4fubNYH v7Fx4pOvdk2LAmRjKQQGROrbnvAdnUvpl7wcOy/ZHc7ypyiC+d9AbCZG0Lw79GmPIy PaojTD7NLxiy2fxThwFLXY/PlPCcTK56rVceNQ7wJcoZQrMHKN4EBERMBgroqF9ooy 6+xvzoW0RNeig== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lblYP-001Dph-KT; Wed, 28 Apr 2021 16:52:41 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v4 03/79] media: i2c: ccs-core: return the right error code at suspend Date: Wed, 28 Apr 2021 16:51:24 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If pm_runtime resume logic fails, return the error code provided by it, instead of -EAGAIN, as, depending on what caused it to fail, it may not be something that would be recovered. Acked-by: Sakari Ailus Fixes: cbba45d43631 ("[media] smiapp: Use runtime PM") Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ccs/ccs-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 9dc3f45da3dc..b05f409014b2 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3093,7 +3093,7 @@ static int __maybe_unused ccs_suspend(struct device *dev) if (rval < 0) { pm_runtime_put_noidle(dev); - return -EAGAIN; + return rval; } if (sensor->streaming)