From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?S29uc3RhbnRpbiBTdWRha292?= Subject: =?UTF-8?B?W1BBVENIIHYyIDkvOV0gZHJtL3BhbmVsOiBBZGQgUm9uYm8gUkIwNzBEMzAg?= =?UTF-8?B?cGFuZWw=?= Date: Fri, 08 Feb 2019 15:24:12 +0300 Message-ID: <1549628652.999919948@f417.i.mail.ru> References: <3eff6d6164845eee5636d7451b0fe08b09d1cf07.1549619502.git-series.maxime.ripard@bootlin.com> Reply-To: =?UTF-8?B?S29uc3RhbnRpbiBTdWRha292?= Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3eff6d6164845eee5636d7451b0fe08b09d1cf07.1549619502.git-series.maxime.ripard@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: =?UTF-8?B?TWF4aW1lIFJpcGFyZA==?= Cc: bbrezillon@kernel.org, =?UTF-8?B?TWFhcnRlbiBMYW5raG9yc3Q=?= , dri-devel@lists.freedesktop.org, =?UTF-8?B?UGF1bCBLb2NpYWxrb3dza2k=?= , =?UTF-8?B?Q2hlbi1ZdSBUc2Fp?= , =?UTF-8?B?U2VhbiBQYXVs?= , =?UTF-8?B?VGhvbWFzIFBldGF6em9uaQ==?= , =?UTF-8?B?SmFnYW4gVGVraQ==?= , linux-arm-kernel@lists.infradead.org List-Id: dri-devel@lists.freedesktop.org Hello, Maxime! >+mode = drm_mode_duplicate(panel->drm, &default_mode); >+if (!mode) { >+DRM_DEV_ERROR(&ctx->dsi->dev, >+ "Failed to add mode " DRM_MODE_FMT "\n", >+ DRM_MODE_ARG(mode)); >+return -EINVAL; >+} Just small fix: DRM_MODE_ARG(mode) -> DRM_MODE_ARG(&default_mode). The "mode" variable is NULL, it leads to the UB.