Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1516948iob; Thu, 19 May 2022 08:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKjgxNwmzBnVVJmkItchWnLN8Rn+aO2fIcC1M5jwZ4wTL5gHrtSXKJy7rXTczpy1NSQwET X-Received: by 2002:a17:907:7e99:b0:6fd:c2a2:9620 with SMTP id qb25-20020a1709077e9900b006fdc2a29620mr5011520ejc.554.1652973248329; Thu, 19 May 2022 08:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652973248; cv=none; d=google.com; s=arc-20160816; b=SzVjiY1+eKGBDKd1QujxaxZfoUFz94hL5ZWukqICA0ru1DozFeD3Bd39xw+UUvLYTc BtKz8I6iMhz6mzn0nVoigtWm2XVHq3B7GQK8tQ0zDQERfmq7XoUS5yEz7s4IJebxRzEQ T2aoE7BLiBvM+d43lHtO6v+gJ80tgnqHfjPpxTbVtVxGeSIdUWRGit8eLL2wklIldHC0 qcC5lqnWPykicdZ6cDQWOkvADi8m7gaDQ6y0Rt+k4goHP2gzqVxPS4Qb/zjlN87T/ZT3 NMbkpTW4JkorvoSGKf2GcXHvu0wPShkB5J0ZOCa6+Lkwqd8G5YBeWNLKqiOD/8EusAbX 2Q5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oDc/l+ZvXyh/h4RLRg/o7k1scruepHlpxflzm71xEPg=; b=m9b+n1ZYz5P7eyUIxB+AVhiGAbbQDob+VasJEXn2pvL4Oz5V6wz0D2S4QlkCTO09Pn RIPanmKrXUN+l2lCHehObk0onHphPcOHrPkQbYMyLgBXdTKuw6Dy1Ci7MALDDLYc0cLW 96Od8geQ22sblLt9M9MypdQ7KtO3BXxgd2WXFJu8DDcNlw6F9EI8YEds1w4opxekxHh1 DRaqGTikSJVtc/k0YBk75oYk8IgWmdvJRqgxPjD7y2LkwMVd1rbL5+Ie9Ttp+30485Zo erwSCy0GwSx6lwcBW/r14uuqNe+R0+XGfBLRS08k7U/ZzlnItnhygFXcc/RnneXMbfeZ GOvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hN7i8a5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw14-20020a170906478e00b006e7111d4ab0si5770735ejc.178.2022.05.19.08.13.41; Thu, 19 May 2022 08:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hN7i8a5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236440AbiESKGp (ORCPT + 99 others); Thu, 19 May 2022 06:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232394AbiESKGm (ORCPT ); Thu, 19 May 2022 06:06:42 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 738FF3A5D5; Thu, 19 May 2022 03:06:37 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 2D6621C0008; Thu, 19 May 2022 10:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652954796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oDc/l+ZvXyh/h4RLRg/o7k1scruepHlpxflzm71xEPg=; b=hN7i8a5GqerC9XaBkUR4ixwCNgLNDgbfrG0m4QGCyuhvkd3n4ycYZeieFwKMC7Q7wMtMgq 8HvbQQbfDjrrgpOc9Xygd004j/QjbLN1OuXzuUqtwpVB6A6CAroYlasTJ2jEyRwVcaQhaU B+k48tIhxQmUIlAscrB3n2HmanJXdnVilPuPFD/pCsZmb0SnvFwlzi5jZ5wuyinxsAlYpW vK/rK5ePfFZfE9glmi1RHwHM8/bos8vmf7/7Ovmkzx7DJ3YkSBmv+KY6hxcj/wSs28Q6Vc 3A7vUJrvqExQLEmTAB2yUcrttt1JN5+sSRl7FkVzKDSuBGWLX8HFoSX6Y8qfbg== Date: Thu, 19 May 2022 12:06:35 +0200 From: Alexandre Belloni To: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Yang Yingliang Cc: a.zummo@towertech.it, sean.wang@mediatek.com, lee.jones@linaro.org, eddie.huang@mediatek.com Subject: Re: [PATCH] rtc: mt6397: check return value after calling platform_get_resource() Message-ID: <165295476623.538132.4203762589258593822.b4-ty@bootlin.com> References: <20220505125043.1594771-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220505125043.1594771-1-yangyingliang@huawei.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Thu, 5 May 2022 20:50:43 +0800, Yang Yingliang wrote: > It will cause null-ptr-deref if platform_get_resource() returns NULL, > we need check the return value. > > Applied, thanks! [1/1] rtc: mt6397: check return value after calling platform_get_resource() commit: d3b43eb505bffb8e4cdf6800c15660c001553fe6 Best regards, -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com