From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.bootlin.com ([62.4.15.54]:46211 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729711AbeKFV7q (ORCPT ); Tue, 6 Nov 2018 16:59:46 -0500 Date: Tue, 6 Nov 2018 13:34:13 +0100 From: Maxime Ripard To: Mauro Carvalho Chehab Cc: Linux Media Mailing List , Mauro Carvalho Chehab , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] cedrus: check if kzalloc() fails Message-ID: <20181106123413.fjd3rqm2f5vtgwpx@flea> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="67n4uz3ligiokdwv" Content-Disposition: inline In-Reply-To: Sender: linux-media-owner@vger.kernel.org List-ID: --67n4uz3ligiokdwv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 06, 2018 at 06:21:29AM -0500, Mauro Carvalho Chehab wrote: > As warned by static code analizer checkers: > drivers/staging/media/sunxi/cedrus/cedrus.c: drivers/staging/media/sunxi= /cedrus/cedrus.c:93 cedrus_init_ctrls() error: potential null dereference '= ctx->ctrls'. (kzalloc returns null) >=20 > The problem is that it assumes that kzalloc() will always > succeed. >=20 > Signed-off-by: Mauro Carvalho Chehab Acked-by: Maxime Ripard Thanks! Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --67n4uz3ligiokdwv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCW+GKRQAKCRDj7w1vZxhR xUWSAP9ZNKEKY9nYo11FL2VugoldFcfFGjKJ5fhtCwIt3u4n+QEAvtfbznZnnGPZ KMHNfcwXsKl8Ee3U+j8ON7ECOSx84gM= =/nYs -----END PGP SIGNATURE----- --67n4uz3ligiokdwv-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@bootlin.com (Maxime Ripard) Date: Tue, 6 Nov 2018 13:34:13 +0100 Subject: [PATCH] cedrus: check if kzalloc() fails In-Reply-To: References: Message-ID: <20181106123413.fjd3rqm2f5vtgwpx@flea> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Nov 06, 2018 at 06:21:29AM -0500, Mauro Carvalho Chehab wrote: > As warned by static code analizer checkers: > drivers/staging/media/sunxi/cedrus/cedrus.c: drivers/staging/media/sunxi/cedrus/cedrus.c:93 cedrus_init_ctrls() error: potential null dereference 'ctx->ctrls'. (kzalloc returns null) > > The problem is that it assumes that kzalloc() will always > succeed. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: