All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Chen-Yu Tsai <wens@csie.org>,
	devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] cedrus: check if kzalloc() fails
Date: Tue, 6 Nov 2018 13:34:13 +0100	[thread overview]
Message-ID: <20181106123413.fjd3rqm2f5vtgwpx@flea> (raw)
In-Reply-To: <b9bd5d87291191eeeef2b0611a1cc0acde52b2c9.1541503285.git.mchehab+samsung@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

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 <mchehab+samsung@kernel.org>

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cedrus: check if kzalloc() fails
Date: Tue, 6 Nov 2018 13:34:13 +0100	[thread overview]
Message-ID: <20181106123413.fjd3rqm2f5vtgwpx@flea> (raw)
In-Reply-To: <b9bd5d87291191eeeef2b0611a1cc0acde52b2c9.1541503285.git.mchehab+samsung@kernel.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 <mchehab+samsung@kernel.org>

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

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: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181106/92ae9614/attachment.sig>

  reply	other threads:[~2018-11-06 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 11:21 [PATCH] cedrus: check if kzalloc() fails Mauro Carvalho Chehab
2018-11-06 11:21 ` Mauro Carvalho Chehab
2018-11-06 12:34 ` Maxime Ripard [this message]
2018-11-06 12:34   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181106123413.fjd3rqm2f5vtgwpx@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=mchehab@infradead.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.