]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: bcm2835-audio: replace null with error pointer value
authorAishwarya Pant <aishpant@gmail.com>
Sun, 12 Mar 2017 15:39:00 +0000 (21:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 23:57:53 +0000 (07:57 +0800)
commitd676e37fb656a091653b61c38357c228353f09fe
tree59f52705fea6b196b0138b9aec7d326227100abe
parentfc8612b1cbd55d805b5df3c867d21699873a95b3
staging: bcm2835-audio: replace null with error pointer value

This patch replaces NULL values returned by vc_vchi_audio_init(...) with
error pointer values:
- Return ERR_PTR(-EINVAL) when too many instances of audio
  service are initialised
- Return ERR_PTR(-ENOMEM) when kzalloc fails
- RETURN ERR_PTR(-EPERM) when vchi connections fail to open

Similarly, a NULL check where vc_vchi_audio_init(...) is called is
replaced by IS_ERR(..)

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c