Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932972AbbFWMpN (ORCPT ); Tue, 23 Jun 2015 08:45:13 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:34972 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754634AbbFWMnJ (ORCPT ); Tue, 23 Jun 2015 08:43:09 -0400 From: Dmitry Kalinkin To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Cc: Martyn Welch , Manohar Vanga , Greg Kroah-Hartman , Dmitry Kalinkin Subject: [PATCH 3/9] staging: vme_user: fix NULL comparison style Date: Tue, 23 Jun 2015 15:42:27 +0300 Message-Id: <1435063353-25914-4-git-send-email-dmitry.kalinkin@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1435063353-25914-1-git-send-email-dmitry.kalinkin@gmail.com> References: <1435063353-25914-1-git-send-email-dmitry.kalinkin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2578 Lines: 71 Signed-off-by: Dmitry Kalinkin --- drivers/staging/vme/devices/vme_user.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 1f00ad7..b6d81e5 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -527,7 +527,7 @@ static int vme_user_master_mmap(unsigned int minor, struct vm_area_struct *vma) } vma_priv = kmalloc(sizeof(struct vme_user_vma_priv), GFP_KERNEL); - if (vma_priv == NULL) { + if (!vma_priv) { mutex_unlock(&image[minor].mutex); return -ENOMEM; } @@ -588,7 +588,7 @@ static int vme_user_probe(struct vme_dev *vdev) char *name; /* Save pointer to the bridge device */ - if (vme_user_bridge != NULL) { + if (vme_user_bridge) { dev_err(&vdev->dev, "Driver can only be loaded for 1 device\n"); err = -EINVAL; goto err_dev; @@ -636,7 +636,7 @@ static int vme_user_probe(struct vme_dev *vdev) */ image[i].resource = vme_slave_request(vme_user_bridge, VME_A24, VME_SCT); - if (image[i].resource == NULL) { + if (!image[i].resource) { dev_warn(&vdev->dev, "Unable to allocate slave resource\n"); err = -ENOMEM; @@ -645,7 +645,7 @@ static int vme_user_probe(struct vme_dev *vdev) image[i].size_buf = PCI_BUF_SIZE; image[i].kern_buf = vme_alloc_consistent(image[i].resource, image[i].size_buf, &image[i].pci_buf); - if (image[i].kern_buf == NULL) { + if (!image[i].kern_buf) { dev_warn(&vdev->dev, "Unable to allocate memory for buffer\n"); image[i].pci_buf = 0; @@ -663,7 +663,7 @@ static int vme_user_probe(struct vme_dev *vdev) /* XXX Need to properly request attributes */ image[i].resource = vme_master_request(vme_user_bridge, VME_A32, VME_SCT, VME_D32); - if (image[i].resource == NULL) { + if (!image[i].resource) { dev_warn(&vdev->dev, "Unable to allocate master resource\n"); err = -ENOMEM; @@ -671,7 +671,7 @@ static int vme_user_probe(struct vme_dev *vdev) } image[i].size_buf = PCI_BUF_SIZE; image[i].kern_buf = kmalloc(image[i].size_buf, GFP_KERNEL); - if (image[i].kern_buf == NULL) { + if (!image[i].kern_buf) { err = -ENOMEM; vme_master_free(image[i].resource); goto err_master; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/