From patchwork Mon Aug 17 15:13:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 266434 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 8A49AC433DF for ; Mon, 17 Aug 2020 15:49:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54C7A20885 for ; Mon, 17 Aug 2020 15:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679369; bh=C8r8mALl/7ZEMq5jWAreO2rJacfW0xTMtM7RPgVBCDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Dvr+X1wzXdf7yLeeUbNAgXAD+FXYSzRilH/gVeR/af5TqWXCIHzu6eS+wnGjk1Ui2 RPmIAPRS8nd0xobpe+Xp5lxu9XuiG/GcnKnwz1dRGJUmZsEcekcTPR1f1AKlUR/osW 6aJHHtOHzzX1F8+/dFKzZZwH1MYr07CUn9PqzVFA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387431AbgHQPtZ (ORCPT ); Mon, 17 Aug 2020 11:49:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:33562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387760AbgHQPtX (ORCPT ); Mon, 17 Aug 2020 11:49:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A94042075B; Mon, 17 Aug 2020 15:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679363; bh=C8r8mALl/7ZEMq5jWAreO2rJacfW0xTMtM7RPgVBCDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=unwJUDMBscgH6+jTZYIvbI9O1Y/v1jxlV10nf+0N3AcNPGFauHnRrSYjX+aXQtXz9 sNGA6j7mS8zSAF6fKPSRkYQ3/mhHx5hyKgvTNjRI8RxxeoGza3uDOOB15sYHO3ttVI bhyp5Cy87I89QsV8H0PRIoHUtyIrc4/1QLwof7YM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.7 184/393] media: exynos4-is: Add missed check for pinctrl_lookup_state() Date: Mon, 17 Aug 2020 17:13:54 +0200 Message-Id: <20200817143828.545911702@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chuhong Yuan [ Upstream commit 18ffec750578f7447c288647d7282c7d12b1d969 ] fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration]") Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/exynos4-is/media-dev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 9aaf3b8060d50..9c31d950cddf7 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -1270,6 +1270,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd) pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl, PINCTRL_STATE_IDLE); + if (IS_ERR(pctl->state_idle)) + return PTR_ERR(pctl->state_idle); + return 0; }