staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM
authorAishwarya Pant <aishpant@gmail.com>
Sun, 12 Mar 2017 15:39:14 +0000 (21:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 23:57:53 +0000 (07:57 +0800)
It is better to propagate PTR_ERR value instead of a hardcoded value
(-EPERM here)

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

index d596f43c2ceab8e1f76a98e50a63d49be69a1952..698fdff24be7dea016d9a2e715a415f7eb4404ce 100644 (file)
@@ -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;
        }