Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219912
b: refs/heads/master
c: b1f5f54
h: refs/heads/master
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Sep 21, 2010
1 parent 651dd35 commit 7c8369e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83ef41f0858b48cce4f8ca23f674ec55d50bf47d
refs/heads/master: b1f5f54e91e30ecd5ac670edc8bb2c0ee5990d0f
2 changes: 2 additions & 0 deletions trunk/drivers/staging/keucr/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ int ENE_LoadBinCode(struct us_data *us, BYTE flag)
return USB_STOR_TRANSPORT_GOOD;

buf = kmalloc(0x800, GFP_KERNEL);
if (buf == NULL)
return USB_STOR_TRANSPORT_ERROR;
switch ( flag )
{
// For SD
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/keucr/msscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ int MS_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb)
DWORD blkno;

buf = kmalloc(blenByte, GFP_KERNEL);
if (buf == NULL)
return USB_STOR_TRANSPORT_ERROR;

result = ENE_LoadBinCode(us, MS_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD)
Expand Down Expand Up @@ -271,6 +273,8 @@ int MS_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb)
WORD len, oldphy, newphy;

buf = kmalloc(blenByte, GFP_KERNEL);
if (buf == NULL)
return USB_STOR_TRANSPORT_ERROR;
usb_stor_set_xfer_buf(us, buf, blenByte, srb, FROM_XFER_BUF);

result = ENE_LoadBinCode(us, MS_RW_PATTERN);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/keucr/smscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ int SM_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb)
return USB_STOR_TRANSPORT_ERROR;

buf = kmalloc(blenByte, GFP_KERNEL);
if (buf == NULL)
return USB_STOR_TRANSPORT_ERROR;
result = Media_D_ReadSector(us, bn, blen, buf);
usb_stor_set_xfer_buf(us, buf, blenByte, srb, TO_XFER_BUF);
kfree(buf);
Expand Down Expand Up @@ -175,6 +177,8 @@ int SM_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb)
return USB_STOR_TRANSPORT_ERROR;

buf = kmalloc(blenByte, GFP_KERNEL);
if (buf == NULL)
return USB_STOR_TRANSPORT_ERROR;
usb_stor_set_xfer_buf(us, buf, blenByte, srb, FROM_XFER_BUF);
result = Media_D_CopySector(us, bn, blen, buf);
kfree(buf);
Expand Down

0 comments on commit 7c8369e

Please sign in to comment.