brcm2708: update to latest patches from RPi foundation
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.19 / 950-0384-staging-bcm2835-audio-Drop-useless-NULL-check.patch
1 From 9f3956e7bbf868894b5aee41110dbe28f117918c Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 4 Sep 2018 17:58:42 +0200
4 Subject: [PATCH] staging: bcm2835-audio: Drop useless NULL check
5
6 commit 8bcf9f252c29c2d5bcce3db605c0ebf1ef230f9c upstream.
7
8 alsa_stream->chip can be never NULL.
9
10 Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-)
16
17 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
18 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
19 @@ -188,8 +188,7 @@ static int snd_bcm2835_playback_close(st
20 alsa_stream->buffer_size = 0;
21
22 bcm2835_audio_close(alsa_stream);
23 - if (alsa_stream->chip)
24 - alsa_stream->chip->alsa_stream[alsa_stream->idx] = NULL;
25 + alsa_stream->chip->alsa_stream[alsa_stream->idx] = NULL;
26 /*
27 * Do not free up alsa_stream here, it will be freed up by
28 * runtime->private_free callback we registered in *_open above