From patchwork Fri Apr 8 10:21:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12806386 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52228C433F5 for ; Fri, 8 Apr 2022 10:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229511AbiDHKZc (ORCPT ); Fri, 8 Apr 2022 06:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiDHKZa (ORCPT ); Fri, 8 Apr 2022 06:25:30 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D53620E94D; Fri, 8 Apr 2022 03:23:27 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 238910LL005378; Fri, 8 Apr 2022 10:23:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=KYoUER8wVR5j6fUYzfvr8Hh5E+TNPuAvS0FUYnzJCeI=; b=ezLADFozsZuJCioJJyrYvgF1pqHrD7NKj8tNQalxHUYT4Z9MD5JU8mrvjeu1LLSRvIZp r+824+W2J18aq9NzwnErsfoGQYKAWfOJ1Xkr9sniH4xkVbC5h3ryea71/PmxclCEllQr J+V7mXk/Dbfa+FyKbYVDWXRDbWaV0BpYGFnEKmBdl4x9EyOPD86VASW+jiP/V1BEpA8D PG3iw6UHsTvmKOCzGIxsEocEVnjd3bXWp046Dg54LapipuTn4HAPaEeNXq7Q4sjcLmZQ 0IxPEbGeahFDjLYer8awBY7V8lFyF0PSnXWHL5pXEiamMBSW/d33DSbU3V4ytD4Ae9nL 5Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com with ESMTP id 3f6d936q01-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Apr 2022 10:23:19 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 2388GswH009572; Fri, 8 Apr 2022 10:21:51 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2109.outbound.protection.outlook.com [104.47.70.109]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3f97wsb0nr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Apr 2022 10:21:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DnTmfyDwlLsPe2c/DHcSMj+ovJPJzvA/0HkKUAQtQX4vE4oFZj1/Kksas3DFNR50JWvtog0vSO+EVR+GoA/yEKOj8P40KP6Gb3LEsXJKmZNLgIsouHffKKsfEgxuIZSjvvqRf8MFrgvZKgiV0I/hvW739JkNG2KUB4HsDIg2NfZTa63YAIH+zl4I+B73HIzhxrtCNIDjgDAEjnoi75PRz7FAXzWwUdn93/tvcptDuA6TkzGLy7AAT3uIiMMUPmn7WQLTHQd8i0WOH0LvYsnCHS47vmy5D8cE7DpX3F4PZugOw/kkyqt82KUCZPZTFbAw9Fec4KkOeWVEwRQcCFTVQw== 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=KYoUER8wVR5j6fUYzfvr8Hh5E+TNPuAvS0FUYnzJCeI=; b=Y8WjPZPCMgGXSEAyVp9O3Xli/VaA2QYEzNWq8t0/6uFq1PU8JZ1Rn/x/vgXuA7PT1O42X1kprJ0CdE4le8pNVO6TbeLKu3gzgqMIFi62FKXAjvEfAGk/dxiU7dcfDh1JMtzwaieLdAVvK1WLPPS2jL/QZatdVICPPZr0XMZLfxZpsEYuiT/CZdhfjUKBTf76QAlPceVlUeFq6T48hBU/qA+YGWK8JL8si6F0jwvSNDKBoCDKlPo7wxsgcwjjmBePIRpelE5RiASYOUzVffl1SR3DloBcHYn5ze0hWVCLW5q6H0BDvx+kquA+zAz23SQbUFKVUi/g0cZOeMPYYhEi9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KYoUER8wVR5j6fUYzfvr8Hh5E+TNPuAvS0FUYnzJCeI=; b=hjdC47/tUAkoj90lO+vSSjDrqpsHJrCBBenjH5Sw0FDzJJHWzq4QWbyzITKRyQ8LQoAUgem2FOVV6G/vWSVHe/Hjiy10R7Mi4afCnZ9N/YTjZfw/h+HllvTcPQSL3ABvEfFYaPvcJhqfXD6M4R9kDpwP1rlQzbHhVaA2bhK0BFo= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by BYAPR10MB3061.namprd10.prod.outlook.com (2603:10b6:a03:83::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 10:21:49 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::b5d5:7b39:ca2d:1b87]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::b5d5:7b39:ca2d:1b87%5]) with mapi id 15.20.5144.022; Fri, 8 Apr 2022 10:21:49 +0000 Date: Fri, 8 Apr 2022 13:21:34 +0300 From: Dan Carpenter To: Inki Dae , Jagan Teki Cc: Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Daniel Vetter , Krzysztof Kozlowski , Alim Akhtar , Robert Foss , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drm/exynos: fix IS_ERR() vs NULL check in probe Message-ID: <20220408102134.GA14120@kili> Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZRAP278CA0017.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::27) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e86583e-15d3-4c1c-98e2-08da1949978b X-MS-TrafficTypeDiagnostic: BYAPR10MB3061:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V4GfxsraiK7Z023hwA6oPpA5bBxTzXF1L1XqZWopbr0ezKC63+nBrxcvHn5sizxr1rOB8QZ7qDe2SH2sbPvVvvcO1otEGW4LxPFfefbAHnxXmy/0e6MQsersLCV7vjWZPhZOfbr+52qEyX37AoRPZu0ATvQLatgjVrfn7ohGa93m1op4qzA+0DM5Df5owaRY3yexmvzU0bGosowxO+kFPYWEvSK1TuJIGRpoIz2P7pud8zIFlgmwjYvAQouIcFL/g2fL3mKAoi6L5Qsiw8XzXxkwhUZvAqVtWP+7sRN4geyzGMeHIXTZV5EviyO2bB/7ZzLhlb9d1aZ18Bhh72epjmw01HHlKiG0/zYpNDmt/dMITheiN1GrsmIQRqPwOxWRejzWzYIrSfJtXUgLsKHGWEoQPELlKOYBqwW9AF7RXyKjcr7DpxEMZIbA1r3E4nBj0CxsoFZX4+VYlKcklBa24XfJq5IdZHtpQsmVbXnk/jUSRnSo18hRfhP/mL8J4TjuQhGRkBvioBUHx6CWm5MmQv1mBDp0snGLk53891b5g70g/cNNm30IZos0Nr9unbEtn0thSpzAb5eLCx3XXC2Scx+XV94m/dT5XMbBdQ2pfMIcIHh/tGVDUFDqcHVqD4oHxbH3liiA0XM48j978B/tbD8Sj8EUJXJ+QKRbdVS8y1zMDTswAPnIzia96tYQQWXoJFWCvdvfqIQl4b7eRaDLjg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(366004)(1076003)(44832011)(54906003)(110136005)(52116002)(33656002)(6506007)(9686003)(6512007)(4326008)(86362001)(8676002)(26005)(316002)(83380400001)(186003)(66476007)(66556008)(66946007)(7416002)(38100700002)(8936002)(2906002)(6666004)(6486002)(38350700002)(5660300002)(33716001)(4744005)(508600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xa5EeNWWr1sTuV/w+Uu1xHANvGy/i7IQ06V03hR0OvcPjy8gxWNMEmhdjU4HvlIbbwfp8B+6dTnyuGaA+lfOnjmTE25khvIQIrcUyzVra4crW1hlUHTaGQ6TUZtm+ELZJpByP40YAEFn0/J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B4Mm1yEyX9r2Lh8ewep/oIex8lvV+mg0GGlBVkpQY8QsKgWAaYCg/5ALjkfhW9DOyXPqFB2U9HMq7jRQBptgNTdc9Iv1PJxQbzz1pzidTvZjg6s+QibDWUZiT5iF4l8RRLMhmczGpsstuGOZmrUPk++uztMOo7hrRZw3bIZ83aXYaHxnCHQg4OVCSg0yRH8qM4TMSlZ/cBVkhcI1UIbNKmZTKTr5PQxTxWBIe3VknXXnEo9oeiE8V3KHULGiAA43BA12/PwPLG94Ro8wFGfX1yGwyD5/6o0R5LmnDlHArwTxP1YJINHRzzJlCXMLQEBpmqqE7ZntBok24Zms7d06PBYM6Sk1DyYwvCcZgiXXXXYpJflrWrNCcPUc0LCMmDt7GWBFjIlsv9QEEqBdafSIrLteQYL0Rp/qIdTdhD/qGT0Bo9SnxbRDq7Qtw5/kjCaXXf3Kk1fRk9yclTch/+iSFL46tAIZl9yduawXz21UnP1pKkAlxG+vwKR5AAcFQqthWEsttPpiADgoCr9gsw4EFq/wfOwv8L44= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e86583e-15d3-4c1c-98e2-08da1949978b X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 10:21:49.3724 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pALenrlMk5Vjx9Ws9TOTDGitpv8Aa/I4yt4h250okBp4eB69vZ4D1qurMRZHK7I+ENR322AcxCCL4L9qhXD7+XgxbisLlTREJAzvu4Hy2Lw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3061 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-04-07_01:2022-04-07,2022-04-07 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204070064 X-Proofpoint-ORIG-GUID: V9rON6zmAvlSkfXLPnbifMFb2MLJrvCd X-Proofpoint-GUID: V9rON6zmAvlSkfXLPnbifMFb2MLJrvCd Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The of_drm_find_bridge() does not return error pointers, it returns NULL on error. Fixes: dd8b6803bc49 ("exynos: drm: dsi: Attach in_bridge in MIC driver") Signed-off-by: Dan Carpenter --- -EPROBE_DEFER is the correct return, right? drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index 9e06f8e2a863..07e04ceb2476 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -434,9 +434,9 @@ static int exynos_mic_probe(struct platform_device *pdev) remote = of_graph_get_remote_node(dev->of_node, 1, 0); mic->next_bridge = of_drm_find_bridge(remote); - if (IS_ERR(mic->next_bridge)) { + if (!mic->next_bridge) { DRM_DEV_ERROR(dev, "mic: Failed to find next bridge\n"); - ret = PTR_ERR(mic->next_bridge); + ret = -EPROBE_DEFER; goto err; }