Message ID | 20221016135200.3406628-1-mirela.rabulea@oss.nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1041410wrs; Sun, 16 Oct 2022 07:35:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yJ/RVvm40g5tx50MNr0fvPD2NADRUtsza5KTU6o92oTw3bpIie+gpnFH8GusesUVPwk2V X-Received: by 2002:a17:903:32c4:b0:17f:be8e:5987 with SMTP id i4-20020a17090332c400b0017fbe8e5987mr7166522plr.119.1665930933111; Sun, 16 Oct 2022 07:35:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665930933; cv=pass; d=google.com; s=arc-20160816; b=BGrtCYfsDrUw3W8qHVPHxD7URINsyVlLX8Lqw9mqpEhPV3ZVAXmAY1xOWc5eK9CYA5 XLgn/gV4M6z4PGDSwL5/EHQG7LEKT74kIEvbIm1w4EnoG3SCkRiCe5ean8MV5OK1IN8D zd3hYcuN08JLfVhan7f7OQ9nb/D7chuwr68fhElgHlFc7fShFTqCslYxkb3g/3lFSGqW noS3YKYnwqnXXpw+z2hdYOtjTrERqb7Rn5RasX0mTKeV8Es54+aqRvcJtHrYWZ7r7+wl XSm6156ZXHBHH4YSsGvcaS1I4hJh1rreuJvY+2tgzQpdG4w2o4Ko986IBolQS+YoHQJf J7hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=6dDCDn2uhf8VX5gl/G265a7U8zGhv62uupqW5+zCYqw=; b=A6CwF9D3FvFUM2Z4wFhw6DmUoT9TFZPNnP7GzD/G2j5OwwJtDxQ7dIcYey0WWZgy82 uN6YrmuQcahCj0tlpeSSryvguaoVILmynlX2IthF/AxnFCXlBslSh6mJFt6hu+9+1mHs 7H3BHtGBDeQsCCg594eGna31YmCmcsIZKdB1Au+TJWigDge+nTdg1hM6BgwPKAG/z71h FqKZX6KRJPUGOmaZCOe8Q4Az4iDAdr5KO9pA7QXKx0j18A//DigTWPQD8F3Y9DBvwoy5 /CndQPh6nVKGaed9swzjpuKp0NisNoBF8pizV87YX4CKEysubtN68aiHkAUtoL1UbtzF z5nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ZDk8WdhQ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g187-20020a636bc4000000b0045fa6e37564si8636429pgc.816.2022.10.16.07.35.18; Sun, 16 Oct 2022 07:35:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ZDk8WdhQ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbiJPNwT (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Sun, 16 Oct 2022 09:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbiJPNwR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 16 Oct 2022 09:52:17 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130044.outbound.protection.outlook.com [40.107.13.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 701EC34985; Sun, 16 Oct 2022 06:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MStsA8qBPaZmw4UZ1Q7LlHinl/TQd7d6PRGl0uLzgNMjV9KacqKS2PymOwVMzXakRwNsgc1KhAYA5vql6FrOajGUk3L4MEy7on4BhFodinJJRd6AfhzOt6a+It5ZkvZfu1udg1ONM1LOAHLAmL1WuFYNITSu8FcobV4lB1gxSX8KeeGf43XUSdGe9Qh3LQV7zMwnxWini/Z5a3/1zEdL9PbW/13W+kbJ6LUbsZjGjT4PVeLohg7BA/i590Tklo1zWIKNprmAbokuaaq60I9dgtsGduVbY1+4pe3L1dO/X4eSENm3NNWGLQ4Dk2msiesVa2u2bwFJwnFpGqy6WlYVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6dDCDn2uhf8VX5gl/G265a7U8zGhv62uupqW5+zCYqw=; b=IW8+v9tPxqY7vMQ42uIjxeeGv4LtgoSlHeG2j+xxmejJQ+CQ5MIeH164c2cXoJR+5PGy8oc6NDAWshQlHUXGcKHt5xrxbcGVlmaaC7NP371DJbAec/BEJZr3PZJ35U60kuBKOyLX/WSBSf9uLBxsJBPGYHrqNGUUs6CD6sRJNmJtMU3j+wg5U0KDCqcyRSvgWfvmqZmAsZ2JDTKZQfNqXTz7QACWfGregOjVTLKIq/qmz+V5nG0ciSuLgD2hsz/HcpeCN98lYpDih80Wfc39HkRGF9nz6c+v8KiSSTDIKkfhdsoRODAW+51gX4BsVGePQml3RlZIUq66w1EoBdAKIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6dDCDn2uhf8VX5gl/G265a7U8zGhv62uupqW5+zCYqw=; b=ZDk8WdhQWIvv+qYMxzq4jx0DRJNee8bPcKO2EyiHMnulWlmgDCi/6kIIWMPD9Rp/gComUkI3imGa0LbZQq1ad0Mv5MJBpqwG+qJ42RmoUMydIoVuvsfF5XngwoLGXULEX3q24IuZ7/E+nzEmcPLNMDrNSgle3q+6R9u7xffWvGU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9244.eurprd04.prod.outlook.com (2603:10a6:20b:4e3::9) by AS8PR04MB8149.eurprd04.prod.outlook.com (2603:10a6:20b:3fd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 13:52:12 +0000 Received: from AS4PR04MB9244.eurprd04.prod.outlook.com ([fe80::a1ae:2f3c:6a54:fb24]) by AS4PR04MB9244.eurprd04.prod.outlook.com ([fe80::a1ae:2f3c:6a54:fb24%4]) with mapi id 15.20.5723.032; Sun, 16 Oct 2022 13:52:12 +0000 From: Mirela Rabulea <mirela.rabulea@oss.nxp.com> To: mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, dan.carpenter@oracle.com, ming.qian@nxp.com Cc: linux-media@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, festevam@gmail.com Subject: [PATCH] media: imx-jpeg: Fix Coverity issue in probe Date: Sun, 16 Oct 2022 16:52:00 +0300 Message-Id: <20221016135200.3406628-1-mirela.rabulea@oss.nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR03CA0004.eurprd03.prod.outlook.com (2603:10a6:208:14::17) To AS4PR04MB9244.eurprd04.prod.outlook.com (2603:10a6:20b:4e3::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9244:EE_|AS8PR04MB8149:EE_ X-MS-Office365-Filtering-Correlation-Id: 8202f536-b9ff-4cab-7fa5-08daaf7da03c X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sos8eGzWfnkqYDaOBHN4mRTbSnK3tI9Vtu69QZtndrpbr6UiVFDu2WB6PWL79RtHslAPGT8vcX0oArB/iiOPVWmQDOFz/1oIbFiyRlvieCfYXVVsx3FpeH++oSOlXs7z4fP87LxuG5hBbGrQQOEt+UqdHyZxiQMiFqatQoBoWhGF2bLe/8GLXby3s5OBvs+PEFmDL0Fot8Coju5g5Xv2xT8tt0yEwMcv4zZG9WfOx8wJTiMQi4lIjPDQBF3CEmrNDBfFhFEh4yzSoqN3ZUMcDfkmMjTavTlz9m4SYIv2zW+fz6IWfoLwn6iyIrODKW+k0025V2z84yCLuWfAaMhJ6WBmcgqgk1vO3RR7q3C/juIsPjYznDJZifg8sSJCQfF3Ug/rHXDrVozZQSlwnObvR94/22dFVf/QADrKZDJZjRf8km831GyeSaFdXwCJrfeEusHc/qkxlSjZEucS8pFVBqlhFHmvkYUxvT4SP34Z7dBiyOY4K1e44kGHbeeyDmM30qBZAFjN/s9ur2c4PjHh8ncE1V6U0nTOFT4EteQgemrQthr6iJLjV1/yw9S5Bq0e01Otj3YOZ5kk5gYGTBK0fJSz/YKiW2N1eLsxm8+v1LW+CNNUkEB5i4wZLwM5gQdbFneBQK6h+nqsBh7vvez+Ad3iqCJsNfD2Pc+99XUzbhlIqCAimM+E6VregKRhyKZTVsupYvqYvKqwTl6mnYLE2GmB/h42dzhNN1I3lqkBCa+4T1VU2trzFDvlQ8n1SYC3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9244.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(39860400002)(396003)(346002)(366004)(136003)(451199015)(6512007)(26005)(2616005)(52116002)(6506007)(6666004)(186003)(1076003)(316002)(66476007)(66946007)(66556008)(478600001)(6486002)(2906002)(8676002)(86362001)(38350700002)(38100700002)(41300700001)(4744005)(5660300002)(8936002)(44832011)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YRwAlaBY74CjHvNfCVCCUEwgesHIuH+5ggBNIrJnNY3Fw9iX3j0O010djtqIpqmPpkcTfn+yFn6x1L3FqV/MO5mwH8P5gqyxPYP0JJr3PbVuV6r6Jp/s071F7JwALhYfuDIYmIj6NscAxSfzt3KkX7y6MMhC61TwOkzjLnvLAR1sRY+1T3BYkFpyHFMHaqHKU9DcEly7RPLj0DD338jnsngEyCSYnn2+n/BfSkrUgVXTPbvGLCuLDKo7KY5JJsqdWcTyTYcA5nYWy/j+e48kjBRR/hj7Cpe3kdccLS48hTobdEvA00yDlFeTjOnZ8tPx3AC0cazR0XFoDMbGB2CXq/ysiH9vaZdDu9Z/gonGF8zgLC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E3XlY/hWTzydi4j7R5kds1ut4BrOB02f0Wm2KzsN62RJWrKQffIWaOOmiRsRro/AvF0kJxXDpmwojmJ6Pk2GNRTALZcPvC/rrueGdQfJ/Nfvmr/XurcwtmVgLpFwti3Ft3ljZ6yrU5klBXfOzFZ4Vmo9tycFslCbFM+4cuA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8202f536-b9ff-4cab-7fa5-08daaf7da03c X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9244.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 13:52:12.2157 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2eZ9lgUukL/NHWQ4OcXrTZJ94qercNgP3jsuXMBOePivNDMzAkbKM9/nftcL4htSdas1flQpaPHDpiFWjnaNew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8149 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746855194231488241?= X-GMAIL-MSGID: =?utf-8?q?1746855194231488241?= |
Series |
media: imx-jpeg: Fix Coverity issue in probe
|
|
Commit Message
Mirela Rabulea OSS
Oct. 16, 2022, 1:52 p.m. UTC
Possible dereference null return after of_match_node,
so check for NULL of_id.
Signed-off-by: Mirela Rabulea <mirela.rabulea@oss.nxp.com>
---
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c index 51a503f0a47b..9d0a361a94cb 100644 --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c @@ -2432,6 +2432,8 @@ static int mxc_jpeg_probe(struct platform_device *pdev) unsigned int slot; of_id = of_match_node(mxc_jpeg_match, dev->of_node); + if (!of_id) + return -ENODEV; mode = *(const int *)of_id->data; jpeg = devm_kzalloc(dev, sizeof(struct mxc_jpeg_dev), GFP_KERNEL);