summaryrefslogtreecommitdiff
path: root/sound/drivers
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-12 21:50:16 +0300
committerTakashi Iwai <tiwai@suse.de>2017-08-13 00:35:48 +0300
commitf1a77dc17103e53e43f33beab67a287feafa6aa3 (patch)
treec790532224128c5cb9a53f71fb1c34c83bc13784 /sound/drivers
parentec1f43c83b9df3052209e0c7e7d936e15251c867 (diff)
downloadlinux-f1a77dc17103e53e43f33beab67a287feafa6aa3.tar.xz
ALSA: mpu401: Adjust four checks for null pointers
The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/mpu401/mpu401_uart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index e8bdea193eab..b997222274bd 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -136,7 +136,7 @@ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id)
{
struct snd_mpu401 *mpu = dev_id;
- if (mpu == NULL)
+ if (!mpu)
return IRQ_NONE;
_snd_mpu401_uart_interrupt(mpu);
return IRQ_HANDLED;
@@ -157,7 +157,7 @@ irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id)
{
struct snd_mpu401 *mpu = dev_id;
- if (mpu == NULL)
+ if (!mpu)
return IRQ_NONE;
uart_interrupt_tx(mpu);
return IRQ_HANDLED;
@@ -544,7 +544,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
out_enable, in_enable, &rmidi)) < 0)
return err;
mpu = kzalloc(sizeof(*mpu), GFP_KERNEL);
- if (mpu == NULL) {
+ if (!mpu) {
err = -ENOMEM;
goto free_device;
}
@@ -558,7 +558,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
if (! (info_flags & MPU401_INFO_INTEGRATED)) {
int res_size = hardware == MPU401_HW_PC98II ? 4 : 2;
mpu->res = request_region(port, res_size, "MPU401 UART");
- if (mpu->res == NULL) {
+ if (!mpu->res) {
snd_printk(KERN_ERR "mpu401_uart: "
"unable to grab port 0x%lx size %d\n",
port, res_size);