Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4799323iob; Mon, 9 May 2022 01:46:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlARXi+BzIqqfOp8oLW6ir39m1FS0+sjXL0BOAUcJ2TPeK1215r87SsE/H8E6hUbMh+DBq X-Received: by 2002:a92:6c09:0:b0:2c7:a105:d426 with SMTP id h9-20020a926c09000000b002c7a105d426mr6266261ilc.111.1652086003000; Mon, 09 May 2022 01:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652086002; cv=none; d=google.com; s=arc-20160816; b=b2/DhwMmh7nIIprYcc78qQ81iNp1ff/CRH+fWoJaUwBWSd9/5A+TzUJK7O8R5kONia ylvIEo/Q9D+U63UmyzOsBAPWFjuLXSJVQkekYhQUMaU8mgGcNm6jQjw5WbG+VQcEKYFj ejHptoTos3YAMaU5ENSDx/XwKSoOEywHyEBmgAaGBhG/X0OIQ4UxHQoISJZUqLsDaiQj 8gsGKubWpDspSKtHAw7WJwwMMGY8pAGCmAjbYSXNithSxsimF3xMnTxhH8hOaRtfMaUO dSljsS9x7G97n5+RvxCQh/ZSnanqonxI3xCvB55RZJYzmrPN7a7G9oaYocHBrD5mWpkk qLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=p3HoMF7tiTm0zifPut+tObDYOmudvNZVO2IVDuOcb5k=; b=WqI0tAwo0wGKYorN5Gh2Vj8X5nLy+lLx5Mm8DsfPPZ9BrC/5FNRPchWpdrShSvxEzC 75DAJ+famBoLvMKZW+qJSfsmPLemxygveL5zZfMZD+kvrOmrtP5jDMpz0oZH0ydNDvvk IJuWATteTS1QQii71+Dj+u44qeSYcFbh9XqvfeolRdw6CMNlbRekKgSU1RXjhm60aLIO uOxQ6kIsivSkXIP0CSzrvRZ0sl1pDwgg5/d/Tq4B4LEZhepdKvgZCO3l6vEAeQjoOR3V 4+MVbe9yP8iJqexHOdofw0U017FBeK4Ly1wgx1KgDcJekuGCQoV0xsTyQ9j2Z74HHDGB WJcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SJeHf6jc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t12-20020a056602140c00b0064958084523si8095788iov.64.2022.05.09.01.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SJeHf6jc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C8A12B24B; Mon, 9 May 2022 01:31:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233840AbiEEO7N (ORCPT + 99 others); Thu, 5 May 2022 10:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380862AbiEEO7F (ORCPT ); Thu, 5 May 2022 10:59:05 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D84DC15A0D; Thu, 5 May 2022 07:55:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id A139B1F4588E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1651762518; bh=GSjTTKSKlxp6CGEr4r1uWboFqF4OcgikJc5WH+aZ4/g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SJeHf6jcioipzxnqvWHiLnb/Q1GKNNe7Torc+t3v+XGkNPVGer0XJqqww15x5s7++ JFVRgNpIP+Uc6vgIjALYu2ncBzZ3/LQXXxXNG9/ExD/YJf0JsfQREX7Hr1X+dIbBX/ hxuX9tcfhgKIRXdimnMVnWVT/TV9CUqZYzyX/OyUYtJHMGIMlPOHd8cgraOuI6zkut pkfBIvN+sFxwp0xQni6t3OwL9IsKrdKDDtqizkhc4iwPy+aFTn7X7gnL80sftX4T/o 7wLjXssOAYv+zaDjFBuhexxy2v6rKxBgxVgu9OkgHvyWsepWCdH3Y18RcMkpajzI4c 56GWuJLcMAA+w== Message-ID: <977dc0eb-fb3e-85bb-43a1-929da9aef307@collabora.com> Date: Thu, 5 May 2022 16:55:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] rtc: mt6397: check return value after calling platform_get_resource() Content-Language: en-US To: Yang Yingliang , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: eddie.huang@mediatek.com, sean.wang@mediatek.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, lee.jones@linaro.org References: <20220505125043.1594771-1-yangyingliang@huawei.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220505125043.1594771-1-yangyingliang@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 Il 05/05/22 14:50, Yang Yingliang ha scritto: > It will cause null-ptr-deref if platform_get_resource() returns NULL, > we need check the return value. > > Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver") > Signed-off-by: Yang Yingliang Reviewed-by: AngeloGioacchino Del Regno