X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_misc.c;h=5588b6a1ee8bd0c7fe57388c755899066b312943;hb=64ee750c29dace1341f32f5f10e8015e7cf5bd6c;hp=4866aed97aacc074b8a88e5ff4218ca59d5b7881;hpb=50ddcdb2635c82e195a2557341d759c5b9419bf1;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 4866aed..5588b6a 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -433,7 +433,7 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int return 0; width = pcm_formats[(INT)format].phys; /* physical width */ pat = pcm_formats[(INT)format].silence; - if (! width) + if (!width || !pat) return -EINVAL; /* signed or 1 byte data */ if (pcm_formats[(INT)format].signd == 1 || width <= 8) {