Minimal linear codes have important applications in secret sharing schemes and secure multi-party computation, etc. In this paper, we study the minimality of a kind of linear codes over GF(p) from Maiorana-McFarland functions. We first obtain a new sufficient condition for this kind of linear codes to be minimal without analyzing the weights of its codewords, which is a generalization of some works given by Ding et al. in 2015. Using this condition, it is easy to verify that such minimal linear codes satisfy wminwmax≤p−1p for any prime p, where wmin and wmax denote the minimum and maximum nonzero weights in a code, respectively. Then, by selecting the subsets of GF(p)s, we present two new infinite families of minimal linear codes with wminwmax≤p−1p for any prime p. In addition, the weight distributions of the presented linear codes are determined in terms of Krawtchouk polynomials or partial spreads.