From mboxrd@z Thu Jan 1 00:00:00 1970 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 B2191E95A61 for ; Sat, 7 Oct 2023 09:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234181AbjJGJ4P (ORCPT ); Sat, 7 Oct 2023 05:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbjJGJ4O (ORCPT ); Sat, 7 Oct 2023 05:56:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93EE8BC for ; Sat, 7 Oct 2023 02:56:12 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC631C433C8; Sat, 7 Oct 2023 09:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696672572; bh=cjSdvgy+F3bHC3Fhr8uA8IIadAj6KK16Go6VF12lU2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rVCTmleuVvB22ihcWk3W/QbC/+xIuFctv++xzEOPVxIs9jR7W+lhvBfwcMXOGi5Iv KOS66jaEybXkUmgxUtDOFGGNhZo2fO6t2nE2xstK+zepuG8MXM4jj5E8Fxb2HEg5hb giXyywUTzTUIej41T42iTl3uBRcfmWz78lVtDP+k= Date: Sat, 7 Oct 2023 11:56:08 +0200 From: Greg Kroah-Hartman To: Nathan Chancellor Cc: Sasha Levin , Chun-Kuang Hu , Philipp Zabel , linux-mediatek@lists.infradead.org, stable@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 5.10] drm/mediatek: Fix backport issue in mtk_drm_gem_prime_vmap() Message-ID: <2023100700-cosponsor-risotto-2a0a@gregkh> References: <20230922-5-10-fix-drm-mediatek-backport-v1-1-912d76cd4a96@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230922-5-10-fix-drm-mediatek-backport-v1-1-912d76cd4a96@kernel.org> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Sep 22, 2023 at 08:51:17AM -0700, Nathan Chancellor wrote: > When building with clang: > > drivers/gpu/drm/mediatek/mtk_drm_gem.c:255:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion] > 255 | return -ENOMEM; > | ^~~~~~~ > 1 error generated. > > GCC reports the same issue as a warning, rather than an error. > > Prior to commit 7e542ff8b463 ("drm/mediatek: Use struct dma_buf_map in > GEM vmap ops"), this function returned a pointer rather than an integer. > This function is indirectly called in drm_gem_vmap(), which treats NULL > as -ENOMEM through an error pointer. Return NULL in this block to > resolve the warning but keep the same end result. > > Fixes: 43f561e809aa ("drm/mediatek: Fix potential memory leak if vmap() fail") > Signed-off-by: Nathan Chancellor > --- > This is a fix for a 5.10 backport, so it has no upstream relevance but > I've still cc'd the relevant maintainers in case they have any comments > or want to double check my work. Now queued up, thanks. greg k-h