Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbaD1GbT (ORCPT ); Mon, 28 Apr 2014 02:31:19 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:51129 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbaD1GbR (ORCPT ); Mon, 28 Apr 2014 02:31:17 -0400 From: Jerry Snitselaar To: JBottomley@parallels.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] virtio_scsi: blank line after declaration cleanup Date: Sun, 27 Apr 2014 23:31:06 -0700 Message-Id: <1398666667-24721-1-git-send-email-dev@snitselaar.org> X-Mailer: git-send-email 2.0.0.rc0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean up of coding style warnings from checkpatch Signed-off-by: Jerry Snitselaar --- drivers/scsi/virtio_scsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 16bfd50..fa0b25f 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -498,8 +498,8 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi, { struct virtio_scsi_cmd *cmd; int ret; - struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev); + BUG_ON(scsi_sg_count(sc) > shost->sg_tablesize); /* TODO: check feature bit and fail if unsupported? */ @@ -661,6 +661,7 @@ static int virtscsi_target_alloc(struct scsi_target *starget) { struct virtio_scsi_target_state *tgt = kmalloc(sizeof(*tgt), GFP_KERNEL); + if (!tgt) return -ENOMEM; @@ -675,6 +676,7 @@ static int virtscsi_target_alloc(struct scsi_target *starget) static void virtscsi_target_destroy(struct scsi_target *starget) { struct virtio_scsi_target_state *tgt = starget->hostdata; + kfree(tgt); } @@ -768,6 +770,7 @@ static int virtscsi_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { struct virtio_scsi *vscsi = container_of(nfb, struct virtio_scsi, nb); + switch(action) { case CPU_ONLINE: case CPU_ONLINE_FROZEN: -- 2.0.0.rc0 -- 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/