Is there any need to check the block name when my module just define a block? I am reading "Drupal 7 Module Development", and I followed the book's steps to create a block in my module.

/**
   * Implements hook_block_info().
   */
  function first_block_hook_info() {
    $block = array();

    $block['list_modules'] = array(
      'info' =&gt; t('A listing of all the enable modules'),
      'cache' =&gt; DRUPAL_NO_CACHE
    );

    return $block;
  }
  /**
  * Implements hook_block_view()
  */
  function first_block_view($block_name ='') {
    if ($block_name == 'list_modules') {
      $list = module_list();

      $theme_args = array('items' =&gt; $list, 'type' =&gt; 'ol');
      $content = theme('item_list', $theme_args);

      $block = array(
        'subject' =&gt; t('Enable modules'),
        'content' =&gt; $content
      );

      return $block;
    }
  }


first_block_view($block_name = '') is using if ($block_name == 'list_modules') to check which block should be rendered, but I think Drupal will only send  list_modules' to my module.

Is there any need to check the block name in hook_block_view()?
While your module defines only a single block, technically no, it's not necessary.

But, as soon as you want to add another block, you'll need to distinguish between that and the existing one, so you'll need to check the block delta.

It's a good practice to get into, even if it's not strictly necessary to test the delta in the block view function.