From: Aishwarya Pant Date: Sun, 12 Mar 2017 15:39:14 +0000 (+0530) Subject: staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM X-Git-Tag: v4.12-rc1~84^2~551 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5e00b25853ef2d5602d14f0e6039268cc89e6afe;p=linux.git staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM It is better to propagate PTR_ERR value instead of a hardcoded value (-EPERM here) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index d596f43c2cea..698fdff24be7 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -436,7 +436,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream if (IS_ERR(instance)) { LOG_ERR("%s: failed to initialize audio service\n", __func__); - ret = -EPERM; + ret = PTR_ERR(instance); goto err_free_mem; }