compile warning cleanup - handle copy_to/from_user error returns Signed-off-by: Stephen Biggs Signed-off-by: Domen Puncer --- kj-domen/drivers/ide/ide-tape.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff -puN drivers/ide/ide-tape.c~return_code-drivers_ide drivers/ide/ide-tape.c --- kj/drivers/ide/ide-tape.c~return_code-drivers_ide 2005-04-05 12:56:54.000000000 +0200 +++ kj-domen/drivers/ide/ide-tape.c 2005-04-05 12:56:54.000000000 +0200 @@ -2656,7 +2656,13 @@ static void idetape_copy_stage_from_user } #endif /* IDETAPE_DEBUG_BUGS */ count = min((unsigned int)(bh->b_size - atomic_read(&bh->b_count)), (unsigned int)n); - copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count); + if (copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count)) { +#if IDETAPE_DEBUG_BUGS + printk(KERN_ERR "ide-tape/%s: copy_from_user failed!\n", + __FUNCTION__); +#endif /* IDETAPE_DEBUG_BUGS */ + return; + } n -= count; atomic_add(count, &bh->b_count); buf += count; @@ -2683,7 +2689,12 @@ static void idetape_copy_stage_to_user ( } #endif /* IDETAPE_DEBUG_BUGS */ count = min(tape->b_count, n); - copy_to_user(buf, tape->b_data, count); + if (copy_to_user(buf, tape->b_data, count)) { +#if IDETAPE_DEBUG_BUGS + printk(KERN_ERR "ide-tape/%s: copy_to_user failed!\n",__FUNCTION__); +#endif /* IDETAPE_DEBUG_BUGS */ + return; + } n -= count; tape->b_data += count; tape->b_count -= count; _