From: Wei Yongjun Date: Fri, 7 Sep 2012 00:17:58 +0000 (+1000) Subject: cciss: remove unneeded memset() X-Git-Tag: next-20120907~1^2~199 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bfd663744cb0acbf0345025f45968ef6fa9d623c;p=karo-tx-linux.git cciss: remove unneeded memset() The memory return by kzalloc() or kmem_cache_zalloc() has already be set to zero, so remove useless memset(0). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Cc: Mike Miller Cc: Jens Axboe Cc: Stephen M. Cameron Signed-off-by: Andrew Morton --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index e04c63ec7759..6526157edafc 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -5198,7 +5198,6 @@ static void cciss_shutdown(struct pci_dev *pdev) return; } /* write all data in the battery backed cache to disk */ - memset(flush_buf, 0, 4); return_code = sendcmd_withirq(h, CCISS_CACHE_FLUSH, flush_buf, 4, 0, CTLR_LUNID, TYPE_CMD); kfree(flush_buf);