From patchwork Mon Sep 27 08:16:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12519377 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D93B3C433F5 for ; Mon, 27 Sep 2021 08:16:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9600A604DB for ; Mon, 27 Sep 2021 08:16:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9600A604DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1C32896E5; Mon, 27 Sep 2021 08:16:49 +0000 (UTC) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by gabe.freedesktop.org (Postfix) with ESMTPS id A5BBD896E5 for ; Mon, 27 Sep 2021 08:16:48 +0000 (UTC) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18R85GSH030426; Mon, 27 Sep 2021 08:16:45 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=9/QCf8HSeELtt5fDGHi57DGcXSbcu0V4BAQwD8XZiEI=; b=CNlU88+I7FqtINnV4zPCThBWdpSHiUd24Glb0NtHEJXA/AGDZKKiGSkRhCHHx6lgmcgA MAH4PkdeHBHQel3iYNsF6YAwc+2eeDKN7zRH5d4uij/1Db9F6R+8V2pWAMVnXkxayGFQ veI5CXUzNXNBQDTIeIBdf1JmCcSNdL1nOa/ixvJ5i+bjrP+RjTXgGMdMURI+hKCrl3x1 qhdDeLkj4R+sgymwVDBgzS1hK+0xa3nNZP6odhwDH0gBoX2kEXqDtY2Y+fCURhUZNgxB Vf68o8DnL1AVJ2x8KW2k9DFRz3WL1UgaUGDiPJw/NlGRBrOZ/eV0phnqQX2afOTKyuh/ mw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3baqvrafgh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Sep 2021 08:16:45 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18R89rQv159101; Mon, 27 Sep 2021 08:16:43 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2106.outbound.protection.outlook.com [104.47.55.106]) by userp3030.oracle.com with ESMTP id 3b9rvtb59s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Sep 2021 08:16:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3J0IZPdMm2jHO+G+LbNT3aTvHOLw4IgvM2ZfPSmC4wjCpPXKY3XAvi7WKTmn2rJW/pd3jmJLT39UPb8QqqZYv0VhToyFAarOOLZauAaHwy38Uy9yRlfnFwx0hkMou1LwCd/amS7W5bv5/JCNTGbW524iYPn556JG5+QCavW9WTQVUjj7IAo67P4GnNOfE17nH4GzoTHGRvmAAtpplsWOIhtT9Ezt/aNxiISfZBtGhZFVvPLISGCHqem9+h/kBGJSqy1QtbmeviTqasZYByOYnmuS7DFmN/PtDBtgeBHtubl2O/2OGL77O+vNVU9VsjpxeLOJQmjUb4hd6cIHJS+gQ== 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; bh=9/QCf8HSeELtt5fDGHi57DGcXSbcu0V4BAQwD8XZiEI=; b=jDLqyPlXYP2Fvb7gRFvYweaHmk11O8PqNAV+BTZDGwTmcx1PyaxI36VzXxBHkh6UH56JWvKeXNnU6laH0f/JaTJGUTyodI4TBEE8i0NaXPQO3xRWsf2ZoPVwXsaDs7XbhoKhB1mfMluyiPt4T9YReZ+8KMMsOquVaKwwGijBSiGDwFNfRT3Yzggq0J3mim57sfNbVrePNBeCvkKlO5JtDdLufSjGpMeUzr7RMwPW4B/vWeM3n+dozutaoWYI25R0+zDfhoVx8wCUaOVyol9DKfbuvfqV3hlUFGOKsgvWRnEPq5n2mB5mY9DEWcLNqQIzkA70gN7Yqw+rHdpU8u0ucg== 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=9/QCf8HSeELtt5fDGHi57DGcXSbcu0V4BAQwD8XZiEI=; b=dII8Ql9F5+aVuZRLZpLrEfWx+gWuzhAngfvhRB26STOv/L1Htv0H7RQ3opdBnRx64Yxb166qDwmqAbHcGih37HcbjjY7C8CK9kwghZIb90YOqtH4XgExdwHLlm6TIY3ttOUqry3lgAZDFEm7L5jbfHOShPkp8YtcjzE4ov4zsBk= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (10.174.166.156) by MWHPR1001MB2320.namprd10.prod.outlook.com (10.174.167.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Mon, 27 Sep 2021 08:16:40 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9%5]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021 08:16:40 +0000 Date: Mon, 27 Sep 2021 11:16:28 +0300 From: Dan Carpenter To: Patrik Jakobsson , Thomas Zimmermann Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drm/gma500: Fix error code in probe() Message-ID: <20210927081628.GA10186@kili> Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: PR3P195CA0022.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::27) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kili (62.8.83.99) by PR3P195CA0022.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Mon, 27 Sep 2021 08:16:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17edfef4-d635-4f09-4ceb-08d9818f2259 X-MS-TrafficTypeDiagnostic: MWHPR1001MB2320: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:792; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nR2X/lOL0ybMIJ9I80SegwaXZ0uj71GcAWQl4EF4mjF4SqpccHJqwGpE2kKxRMGhvsae04hFf/9c+gg7jmY9gS7MX+rD+NFFe/avGqmFexfGgwXZ7lGbPSAOKsLtVmyZCxwqisIRy3qajku0sTNHSavOykHkH1xB/VzjR8OgFdxhDpUpvB9KIIGnApZzWPjtAaBgwwP5Iu3SJr2VTRpBfynGwjIGeavXObiXMHnCPPPmoFihaeIGHcTYv8CUoQJ2WauTCTTdaShuag8IzzrXAI1/7rOljjpxhHbPab/KhCv4FBwVGhz9CHDs7TtGROYOIqLXiYnrwkBV5ybpzvrOL9SSlNLr26cjztKlP0x1JOLOWF+RWeDp5dk6ngmcDvoYhWVH/MJV0RPRkQ9bIPh7yLprnRwpLUq9BCExnXkYbQIoim5F8Iq8/vL44qV+P4YzCOMrIy9HFwvzkZ4+F1QeoglYmIBt807CWrDhMYnD1vgCryjByyxD1ELyaUTqOPWN0x2R/NuowAE+6OZt/GseVGUk5JE2D/iDwkm2njHpqmc2jTSnIHmYRwCJ+d5+t2cUMRRsFfwzLgmxiPef9bQfOhGXjqU9MoDka0c0E+0AFgHDFCg1svJGdX70wnfnEio0YzVPAh1rl9v06WgcCuTkdzL5RAqPFZMEub+x5O4XhU6KnyOgbyOvcOFrc/4UNBACPBahwVrRoSotaojqjyviHw== 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:(366004)(38350700002)(38100700002)(55016002)(9686003)(316002)(44832011)(4326008)(2906002)(86362001)(33716001)(956004)(54906003)(110136005)(5660300002)(6666004)(1076003)(4744005)(508600001)(83380400001)(9576002)(6496006)(186003)(33656002)(26005)(8936002)(66476007)(66556008)(66946007)(52116002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Onv9WxT/Nmg+4QD0PWv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8XrEZDTGDvsjkys1w8BG70XdKeU78ystjlDfRXwLJ1uGRZ4T13Rr3++3dfOUAceQlx2ZdjQS7VAXxSwmQB1G1ZD4V6u4Dh9zJTerqdqzzElcgKzFTy92ydvHksrWQ02A54x9PDuZHY3PE4esQ99xItyUELuSwoKAn3Zn8wSY0xqM7xcse2um40LNvbqIPy/ewSlwxT+ZGY2BDq/ttGXAKCy+aKnWC/xXVLrAH+WLWLI3GDRH X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17edfef4-d635-4f09-4ceb-08d9818f2259 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2021 08:16:40.7809 (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: J4jr+1jRT2uBXHvgLm2ofarkJx1XxeQVRbzhvj8gmH0lNgxtPbjqbQu4nBNnJObwqM19FtY2aAqU6tQvexjlxuAd392d+9AjyWhh9rAOpdU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1001MB2320 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10119 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109270056 X-Proofpoint-GUID: TpDw7l04Dxm7QzHQDUlFX4BhsSybAjtx X-Proofpoint-ORIG-GUID: TpDw7l04Dxm7QzHQDUlFX4BhsSybAjtx 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The error code is stored in "dev_priv", not "dev". The "dev" pointer isn't initialized yet. Fixes: c2f17e60cbe1 ("drm/gma500: Embed struct drm_device in struct drm_psb_private") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/gma500/psb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index 3d036d2a3b29..7a10bb39ef0b 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -454,7 +454,7 @@ static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev_priv = devm_drm_dev_alloc(&pdev->dev, &driver, struct drm_psb_private, dev); if (IS_ERR(dev_priv)) - return PTR_ERR(dev); + return PTR_ERR(dev_priv); dev = &dev_priv->dev; pci_set_drvdata(pdev, dev);