Skip to content

Commit

Permalink
TTY: snyclinkmp: calculating wrong addresses
Browse files Browse the repository at this point in the history
This is a static checker fix and I don't have a way to test it.  But
from the context it looks like this is a typo where SCABUFSIZE was
intended instead of sizeof(SCABUFSIZE).  SCABUFSIZE is 1024 and
sizeof(int) is 4.  I would suspect this is a bad bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jul 24, 2013
1 parent 3b2f64d commit 2652c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/synclinkmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3478,7 +3478,7 @@ static int alloc_buf_list(SLMP_INFO *info)
for ( i = 0; i < info->rx_buf_count; i++ ) {
/* calculate and store physical address of this buffer entry */
info->rx_buf_list_ex[i].phys_entry =
info->buffer_list_phys + (i * sizeof(SCABUFSIZE));
info->buffer_list_phys + (i * SCABUFSIZE);

/* calculate and store physical address of */
/* next entry in cirular list of entries */
Expand Down

0 comments on commit 2652c21

Please sign in to comment.