Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2148719iof; Tue, 7 Jun 2022 21:22:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIFkYBtpuRtRbA7Zt9WP8ag5Sk+YaRNrXJpPxz8VHBOmL3MHwU0aPOAeU5P0yxyQB4OUq3 X-Received: by 2002:a17:903:408c:b0:163:e526:4397 with SMTP id z12-20020a170903408c00b00163e5264397mr31639149plc.80.1654662153047; Tue, 07 Jun 2022 21:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662153; cv=none; d=google.com; s=arc-20160816; b=t/uXJ/Rs8TPYXyqsXspfk47iOFmAXuHjbNFShEzB9+4/cUPU/QVVb7Q7HxocaX2YAf Pzjz08f1xUKeBDFJEaKfX5gqLKVq40WoF96J/EY6OVGdVLJmOErdz8irQm4dpl26TNkX qcsNv/MqySGRxAeePW/pPN9fJ+lqY4PV0Ixr3xtW9PH6/CX45GSb07wpewqBZBghNCKz zBcyLLsy1m4DGynWE8QubjLrEJn8AQVXdSMsydox/W/4kJs2dAT3ZhsWN4hd/erRhg2c oj/vXK/GWJuuIyDcTVBW60j/Yxad1AUvpO45Cxmh6Wh/on2M4Dy5KdSdJ1LKaQmbEL// 6f/w== 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=zKlAZqz0EGNXAwgdvlKE5DUhzLBekdxLNtOxYWKYGRs=; b=hprtHMUjV0l+rI8tTaltELXRJ+0kfxJXjEoKconPg4u1CnwwcvW0/g7N5RsQTQF5CB EUfBmqK2TzbbFWW3nWlov8Xys03cEx/6BS8SK/2U0Ug21Rg/haoyPB3w136v1g4SkXV/ 4OQnmjfY4DJMdq24DGYEe78Bzxc8+4RRlO1OknbRVyj4pPUGSEfX56Fbp6Reouf9D2JK g9SiI6gAGsjWbs1PIPxM2pUVl1Ik1zWeXY7KwlnkgGfwmHczo0F+k9P1AeDqJE/402NP hCkUqOlS1S8L5xIwO9FJhsPZ9OoNrc+/UhxBDCWtkasS7dAMvx1GJ19vCWeFNNKC//pq 56qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JA4f6WaN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u4-20020a63df04000000b003faefdcaec8si27247456pgg.816.2022.06.07.21.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:22:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JA4f6WaN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07B6A443579; Tue, 7 Jun 2022 21:11:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380755AbiFGWXt (ORCPT + 99 others); Tue, 7 Jun 2022 18:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380748AbiFGVQ4 (ORCPT ); Tue, 7 Jun 2022 17:16:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51F9A49F17; Tue, 7 Jun 2022 11:57:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E1AE76159D; Tue, 7 Jun 2022 18:57:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F22A4C385A5; Tue, 7 Jun 2022 18:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628232; bh=Kp9lSNG9ZMRLzWcdumWHugzb7Zr7YUX0zq3Ss2UvdWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JA4f6WaNqku7BL5owwsO1oeZ/Wu9GepcUPt7xlVEj2o87fheIH7TelIiV045rWY/m VuS7UJV0Jw4QiV7QraratfKORWYAi+S3D/MVduJz8fyNjk6jU9/5c8QsNHiOpkk4Y+ TZ8ouy7KMOZF4kAIr1ynD2BBfYUFm56+p6CLJ/ec= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Arunpravin , =?UTF-8?q?Christian=20K=C3=B6nig?= , Sasha Levin Subject: [PATCH 5.18 255/879] drm/selftests: missing error code in igt_buddy_alloc_smoke() Date: Tue, 7 Jun 2022 18:56:13 +0200 Message-Id: <20220607165010.251403464@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 016d1ca3f6ad05676fd9e418715ddce1f4ab5a73 ] Set the error code to -ENOMEM if drm_random_order() fails. Fixes: e6ff5ef81170 ("drm/selftests: add drm buddy smoke testcase") Signed-off-by: Dan Carpenter Reviewed-by: Arunpravin Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20220307125458.GA16710@kili Signed-off-by: Sasha Levin --- drivers/gpu/drm/selftests/test-drm_buddy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/selftests/test-drm_buddy.c b/drivers/gpu/drm/selftests/test-drm_buddy.c index 913cbd7eae04..aca0c491040f 100644 --- a/drivers/gpu/drm/selftests/test-drm_buddy.c +++ b/drivers/gpu/drm/selftests/test-drm_buddy.c @@ -488,8 +488,10 @@ static int igt_buddy_alloc_smoke(void *arg) } order = drm_random_order(mm.max_order + 1, &prng); - if (!order) + if (!order) { + err = -ENOMEM; goto out_fini; + } for (i = 0; i <= mm.max_order; ++i) { struct drm_buddy_block *block; -- 2.35.1