Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1933448pxb; Thu, 16 Sep 2021 20:46:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC2C2haY43gwI5dpWjkHQ2Xmz81sHNqHOydaI3vJOz+qZcuy6vPa7OSVLkuvCLONCh08Ep X-Received: by 2002:a05:6602:3c5:: with SMTP id g5mr6962415iov.42.1631850405173; Thu, 16 Sep 2021 20:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631850405; cv=none; d=google.com; s=arc-20160816; b=mWmANf9JjKU1sTvWsKhmdb+WZq+sQj0nvKqVcyMrWndk/KhbHrUc1F2vEzCamTwPWa M5tOuVUD3KXTBanQhwcF3ZIyg+f/eGg/sMMyFF0tH+VYvij7tlBxSCM7Nh7uLh2AKl2H rUkYC0BR010VBa3OCSIjVr4V8F/K5o5Mm52TAoMG1nCo+Ag7qS1EQG3hegn+B6aRflgp Jl0forK1vYbVs91/0nnLrkcEZU+2KQpAT08qYfeI/LpterFYH5XN95K8bGaNPMt6pRVg nXSN1yqghYEVWmNONe2+4y+aTSJlwBXaIlzwFYkxKht6UTlpi+vN9wypEsxul2CIeGfK bMHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yVnCrn1iGhQg7Q7ZJJAoSGbycwriFVjQGHW254MheZQ=; b=ZMXsAa1P6/knO+BcVsKL8Y7CKUIO+ji/39Eao0w8kVTAgpeOtuAyRdFsm/N1eGC2HG 0n3j4FkHNAq8Crxm21A9lxYP0SG+OLM6g9kf9biYBzP1v9r4KukVJNG+hKsNlCba2ac3 8HoPJzbHv8CWFwflVxvxAaa/zk7OD8AF9NJCDog02lXVvQGHVZ1yVzjWyVYFFn+4r/yY 2z43obGZ6/COdbfG3PN7TkR5oun8SSgigRg3e8HsLsLE+L1EORgV1nZmfgrdYKHhU0aY kz72SyrC7PCdzDfAakMUoUs2abZT01meFETv8VQ3zGX1Uhfif1cFCDcb1/ok+hn2oOMf fTTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IN4KhtL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 189si4074612jaj.45.2021.09.16.20.46.32; Thu, 16 Sep 2021 20:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IN4KhtL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349209AbhIPRdo (ORCPT + 99 others); Thu, 16 Sep 2021 13:33:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:46924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232572AbhIPRX4 (ORCPT ); Thu, 16 Sep 2021 13:23:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A59A61A3F; Thu, 16 Sep 2021 16:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810605; bh=7FvsFiEPAIWP317qoqfXay4JMpQCL7PcuvxmqY13QkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IN4KhtL5GHz3qyp0TUlY7A52yQTSnGDmfvbKvCCUdqTNehswEATo/GezY2LitY4F1 t+ZY0TfwBtJLaxTCPFuMNAkrFqnuSJIZVvaYkdmzgSKfWvz5rjU2rDkGBDJ4Q7xOax 0m91KO88GnJC44kokzbXqjNF+ACI/crcpXp7XNrI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.14 170/432] media: ti-vpe: cal: fix error handling in cal_camerarx_create Date: Thu, 16 Sep 2021 17:58:39 +0200 Message-Id: <20210916155816.499672264@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen [ Upstream commit 918d6d120a60c2640263396308eeb2b6afeb0cd6 ] cal_camerarx_create() doesn't handle error returned from cal_camerarx_sd_init_cfg(). Fix this. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/ti-vpe/cal-camerarx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti-vpe/cal-camerarx.c index 124a4e2bdefe..e2e384a887ac 100644 --- a/drivers/media/platform/ti-vpe/cal-camerarx.c +++ b/drivers/media/platform/ti-vpe/cal-camerarx.c @@ -845,7 +845,9 @@ struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal, if (ret) goto error; - cal_camerarx_sd_init_cfg(sd, NULL); + ret = cal_camerarx_sd_init_cfg(sd, NULL); + if (ret) + goto error; ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd); if (ret) -- 2.30.2