提交 48efbfbf 编写于 作者: T Tobin C. Harding 提交者: Jens Axboe

cciss: Remove kmalloc cast

Coccinelle emits a warning about casting the return value of
kmalloc(). Coccinelle suggests removing the cast as do
kerneljanitors.

Remove cast from kmalloc() call.
Signed-off-by: NTobin C. Harding <me@tobin.cc>
Acked-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 19a5e10c
...@@ -647,8 +647,7 @@ cciss_scsi_setup(ctlr_info_t *h) ...@@ -647,8 +647,7 @@ cciss_scsi_setup(ctlr_info_t *h)
struct cciss_scsi_adapter_data_t * shba; struct cciss_scsi_adapter_data_t * shba;
ccissscsi[h->ctlr].ndevices = 0; ccissscsi[h->ctlr].ndevices = 0;
shba = (struct cciss_scsi_adapter_data_t *) shba = kmalloc(sizeof(*shba), GFP_KERNEL);
kmalloc(sizeof(*shba), GFP_KERNEL);
if (shba == NULL) if (shba == NULL)
return; return;
shba->scsi_host = NULL; shba->scsi_host = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册