From patchwork Thu Apr 28 12:26:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12830617 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25CA3C433FE for ; Thu, 28 Apr 2022 12:26:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 730EB10E3B4; Thu, 28 Apr 2022 12:26:52 +0000 (UTC) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5129610E38F for ; Thu, 28 Apr 2022 12:26:51 +0000 (UTC) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23SB1k2q015535; Thu, 28 Apr 2022 12:26:38 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=1hvGKSvzYzszlPQmMSg4O4pQKOYaD/9ul/dAoxiyltQ=; b=APJaIzRMvYuKpkI5UJHyDhDT2LEhCu1+YSlGm/MlWOuaZFZ99Zg6uEcXcX3kaFN1EPwn 5gHeM5wcnO+n/wsEWXB4Qc54N0HR0LmXLwOtRYvWNJNeo/xLrN4wazu0aRrZ4k68Hc3U FJkCAys2d8OD9k3FZI4pNgNBI+T1qRVezfXhbkmUOKPVI4UjgeT0uX3KvmEU29phh7Ud SHVIKqFMuscti6YNMqeV551sO2XBJKodA5l5oRGeQlOAYwCyfMPvUOqYVbnAW1dAq9aC Zlh5uWsSfjQdq5/PzaRVcHmuPw7v7amGNiKatI0axVbgBcnmtDTUzJhuSV7YG59H2hqB Eg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fmb9aus6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Apr 2022 12:26:38 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23SCANwj020419; Thu, 28 Apr 2022 12:26:36 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2107.outbound.protection.outlook.com [104.47.55.107]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fm7w6hpj1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Apr 2022 12:26:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDNmxwwGf4oewM0PYCD1psBYZwlosgRdchll/u1FVHIzuFCLV/SP/kBLlY/TFLORcVqeZOvHQqlsZGeV4qFvmN/u/vm4BnKSo5aEeNbHFY1VMXfYcFM0l2Cd09I1Ej+CldKblykP0CMYocJdGQnL7Bz+0oLjVmlRT2Xjogx6x4a0t7AeFZdDAMxCU2fwe4yeZ/fM4qCW5DDiEjUDAWA66P/P57OFMYw8eJ21a2DmyQXjGaMRl8SzNJ8pfpVN+pBMJRI0pgo3ETle9ZTTCqG/p7keYpT1bzfGBJGxv4GeL2aaDpL85v2lwDUQXsy2153Qvo4H0j/pCHWS9l58hYvt6w== 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=1hvGKSvzYzszlPQmMSg4O4pQKOYaD/9ul/dAoxiyltQ=; b=Ogl6gzzEfyYYDqDuO0+O/AfypYn8AGJTjB1To5OarZ4NmXzOhHP4gumTB3HmY+HgXvUZAcz5YOrXvNe+ehEmRoIAHmV/EPd6s6snv6ioiTeK5pT3JxDkgv128cf6chkdx4KnVXQe4hluBge4QsrWq2ha0qhs6E69+qzG6w2JtEsEWwivM7HNxcOZpplN8m1JMV9cNzAw3qOE8eJ4EQIWjE2JjVD8SIoxALjQ/8yTjzjAy/pH6v5fKghoV0pasK9WUBUAliXWB2UTlpkyHnENTPS8OwhsRhoHbqJPu9Z24UnZj10zdqa5rD5fgRbjiF+QCZQlS5EtA2BePfTFJIAhkA== 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=1hvGKSvzYzszlPQmMSg4O4pQKOYaD/9ul/dAoxiyltQ=; b=CChoQG88CF1E4SY+nfa5ac61LehKUZE6y6WyOinw1eZH1rA4wtzP1tTIb1aUGZg8o95eXIn6530QC2MRvSTq4gAktcdh0jny4fk924TvrBp3YZYMJ8ru6bKHkuUpdECY3hE2CMtPPXTAUJzOw1/7S+vhAqIaH1jwyrdLnTyDNqI= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by SN4PR10MB5800.namprd10.prod.outlook.com (2603:10b6:806:20f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Thu, 28 Apr 2022 12:26:34 +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.5164.025; Thu, 28 Apr 2022 12:26:34 +0000 Date: Thu, 28 Apr 2022 15:26:23 +0300 From: Dan Carpenter To: Maxime Ripard Subject: [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks Message-ID: Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0041.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::10) 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: 680f1a99-de5e-4410-b0c7-08da291254fa X-MS-TrafficTypeDiagnostic: SN4PR10MB5800: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: 4P6Yj7BFJphN5uDDGqRvHtACX+Ox3lrkGX2tVPwIxP2skOeLK3r6R1Jj+6EH1DE9brM66fYwbtecYu5D1Q+k5aGk7UYDKC/A7Vn5KLvMLWWCevNmrMH18JVLVWoMpJFrd1JV2LVaW52QyIc1hmcgekCZdxyXmNfUXi7WzfmFzYakRezEokyt3Q7sCv5oJkwJqKRMQCMxi926GZzjHo1Rp+gCuSaASBgh8RfcqOWI1+AfwKFg241SHMwe5FZL1G+E2umytCPygOvyruFhLAzX7NS0bYXMvtbN+4NzDSJNP1a7N79KGk3unMx6knjOuDyK0S9kYa6H2wjzBL9V64Z6mSWXP3ovXMxRWK+dV2UGPMyV3nnvM+nNRD2Moi20Nsjs5MNqdEkGwScv7EOZU5CiUxcWXujT5qB9Ng324S+uKNUGdQLiNu9NX0i1d1fgt8PERXT4RRO482sV890VGQm6LTmcbGOBQN8/AKRlT8OfObLaP7e6aVBo8mVp2OEGhS2eSbh/pYRZaWDVmhuup/lEWdeHYLaT0cCKnRu1YnminN3dRI4RVTld5WeGK2lJfMNyj8ftX8v7k4xiHwAPdM9Kj8ECRg/n7Vmv/kjp4c6D9l+OlxDOqPkKCP8uxOuO0MVmbYdcxVRZbxlEAalTkY6k8rqKSB90uPaqcbmGr/u69t/vXMb8z1oLWYlg5jfaFBd0ZRqPrnwU0nw1KhpdfWk9tA== 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)(83380400001)(33716001)(6916009)(54906003)(8936002)(4326008)(316002)(186003)(66946007)(8676002)(66556008)(66476007)(26005)(6486002)(52116002)(44832011)(38350700002)(38100700002)(508600001)(2906002)(86362001)(6512007)(9686003)(6506007)(5660300002)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5vFcU5q7u5/KaScfmzC+tKHNVrVgFqShgOAdSdzU5CgnAMXYdk3d245zC+1Lp7eVOlnUf1O6dDmBWGickizibaFqG2XxB4nkAraNMFiXdUxt+d+Sy4/11ufK7gqQb7gT1LtaGEBQ3bonKGxKepYP6tgHQVwvrglPJNGh7I5NqitBAV5pvuxT1F1v/SsfmD7ZBhsEXeo3QyZIMQZSiZ1XYFj4PkPa7MdI/+ItXVf02Ky0RiWZ6wE2V08U9oIZprOL69EEYBs5tU1M1qqQbzOyBDwHQLuVtQvqdWuy5eMBWwQQVmEeqq4hAQaN8Wv224AO0H3VIB8Ov7LC52KNxNeWV/aVv1oqjVmoIZks7NZwYHStRifonboQav7K7tm7FDcXjca3a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cF+TWX0jrlpzaq2C7gwkv8gaICpLCKoUg/CVTb+xljtOzOnJZjwGs3JXjCQ2Hik7Npdpw7f3UOEzyGWmh1H3ZJXWgZkB9WILRI4/x8KuInyRKa2zz7doq2gRP5QVfJkIjRa+Zgr0nT3objoC7jj0EIZ64/VEagqxBmiNZ6gOdQnhP5/cd4bIj8waMqG1EnlFg2mb2Tn2GTJL5rFKXuZDY39JMgf4d70i3GsbrDQyFUNjXjS7BlmWKBb7NV4JsrGZyrl2hotty4876Mc28g0nbAxAmjARhlSWHKFsrr4+g3yAiOQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 680f1a99-de5e-4410-b0c7-08da291254fa X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2022 12:26:34.0868 (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: sAZkDT29rG01I9sOqUDmNs9ZJLCvI9tHW4/Hs5FH/UbbSx9XK4UF9+GugDWhUrLvQ3cMONI8G6RXZh+DyYbS1xf/6NXfmhSxeQIkTsmpNTQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR10MB5800 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-04-28_01:2022-04-28, 2022-04-28 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204280076 X-Proofpoint-ORIG-GUID: 7Tt377KX9KIUe1DC4xRixdziz07vARtP X-Proofpoint-GUID: 7Tt377KX9KIUe1DC4xRixdziz07vARtP X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Holland , David Airlie , kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org, Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "dsi->bus_clk" pointer cannot be an error pointer at this point. The check is confusing and unnecessary. Delete it. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 527c7b2474da..b4dfa166eccd 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1193,8 +1193,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev) err_unprotect_clk: clk_rate_exclusive_put(dsi->mod_clk); err_attach_clk: - if (!IS_ERR(dsi->bus_clk)) - regmap_mmio_detach_clk(dsi->regs); + regmap_mmio_detach_clk(dsi->regs); + return ret; } @@ -1207,8 +1207,7 @@ static int sun6i_dsi_remove(struct platform_device *pdev) mipi_dsi_host_unregister(&dsi->host); clk_rate_exclusive_put(dsi->mod_clk); - if (!IS_ERR(dsi->bus_clk)) - regmap_mmio_detach_clk(dsi->regs); + regmap_mmio_detach_clk(dsi->regs); return 0; }